Duplicate entries to add same search engine

RESOLVED FIXED in Firefox 3 beta4

Status

()

Firefox
Search
--
minor
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: nathaniel, Assigned: Gavin)

Tracking

Trunk
Firefox 3 beta4
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3

After viewing the source, it appears that adding two entries for the same search engine on a page (for 'discovering the engine') using <link rel="search" type="application/opensearchdescription+xml"> will cause duplicate entries to appear in the add search engine drop-down menu.
Firefox should detect that they are the same, and only show one entry. (Confusing otherwise.)


Reproducible: Always

Steps to Reproduce:
1.Make sure Mozilla Links search is not installed
2.Visit http://mozillalinks.org/wp/2008/02/a-deep-look-to-firefox-3-beta-3/
3.Click search drop-down to see search engines available
Actual Results:  
Notice two entries for same url. (Same title, and hover text shows same url)

Expected Results:  
One engine (if really the same) or some indicator that they are actually different.

The referenced site has:
<link rel="search" type="application/opensearchdescription+xml" title="Mozilla Links" href="http://www.mozillalinks.org/download/mozillalinks.xml">


<link rel="search" type="application/opensearchdescription+xml" title="Mozilla Links" href="http://www.mozillalinks.org/download/mozillalinks.xml">

As the code that produces teh duplicate entries. Note that both entries are exactly the same.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows Vista → All
Hardware: PC → All
Version: unspecified → Trunk
Created attachment 303054 [details] [diff] [review]
patch

I considered last-wins behavior rather than first-wins, but this is a bit of an edge case, and first-wins seemed simpler. Also removes a check that will never be true, as far as I can tell.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #303054 - Flags: review?(rflint)
Comment on attachment 303054 [details] [diff] [review]
patch

Yeah, I agree that this is edge-casey enough that first vs. last shouldn't really matter.
Attachment #303054 - Flags: review?(rflint) → review+
Created attachment 303167 [details] [diff] [review]
with test
Attachment #303054 - Attachment is obsolete: true
Attachment #303167 - Flags: approval1.9?
Comment on attachment 303167 [details] [diff] [review]
with test

a=beltzner
Attachment #303167 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Flags: in-testsuite?
mozilla/browser/base/content/browser.js 	1.966
mozilla/browser/base/content/test/browser_autodiscovery.js 	1.2
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Flags: in-testsuite? → in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 beta4
You need to log in before you can comment on or make changes to this bug.