diff --git a/browser/components/search/test/browser_yahoo.js b/browser/components/search/test/browser_yahoo.js index 032672ebdcb3..806e5d61a75c 100644 --- a/browser/components/search/test/browser_yahoo.js +++ b/browser/components/search/test/browser_yahoo.js @@ -13,7 +13,7 @@ function test() { let engine = Services.search.getEngineByName("Yahoo"); ok(engine, "Yahoo"); - let base = "https://search.yahoo.com/yhs/search?p=foo&ei=UTF-8&hspart=mozilla&hsimp=yhs-001"; + let base = "https://search.yahoo.com/yhs/search?p=foo&ei=UTF-8&hspart=mozilla"; let url; // Test search URLs (including purposes). @@ -29,7 +29,7 @@ function test() { name: "Yahoo", alias: null, description: "Yahoo Search", - searchForm: "https://search.yahoo.com/yhs/search?p=&ei=UTF-8&hspart=mozilla&hsimp=yhs-001", + searchForm: "https://search.yahoo.com/yhs/search?p=&ei=UTF-8&hspart=mozilla", type: Ci.nsISearchEngine.TYPE_MOZSEARCH, hidden: false, wrappedJSObject: { @@ -81,7 +81,27 @@ function test() { { name: "hsimp", value: "yhs-001", - purpose: undefined, + purpose: "searchbar", + }, + { + name: "hsimp", + value: "yhs-002", + purpose: "keyword", + }, + { + name: "hsimp", + value: "yhs-003", + purpose: "homepage", + }, + { + name: "hsimp", + value: "yhs-004", + purpose: "newtab", + }, + { + name: "hsimp", + value: "yhs-005", + purpose: "contextmenu", }, ], mozparams: {}, diff --git a/browser/components/search/test/browser_yahoo_behavior.js b/browser/components/search/test/browser_yahoo_behavior.js index 2cf5b6890cbf..932478e56928 100644 --- a/browser/components/search/test/browser_yahoo_behavior.js +++ b/browser/components/search/test/browser_yahoo_behavior.js @@ -18,7 +18,7 @@ function test() { Services.search.currentEngine = engine; engine.alias = "y"; - let base = "https://search.yahoo.com/yhs/search?p=foo&ei=UTF-8&hspart=mozilla&hsimp=yhs-001"; + let base = "https://search.yahoo.com/yhs/search?p=foo&ei=UTF-8&hspart=mozilla"; let url; // Test search URLs (including purposes). @@ -31,7 +31,7 @@ function test() { var gTests = [ { name: "context menu search", - searchURL: base, + searchURL: base + "&hsimp=yhs-005", run: function () { // Simulate a contextmenu search // FIXME: This is a bit "low-level"... @@ -40,7 +40,7 @@ function test() { }, { name: "keyword search", - searchURL: base, + searchURL: base + "&hsimp=yhs-002", run: function () { gURLBar.value = "? foo"; gURLBar.focus(); @@ -48,8 +48,8 @@ function test() { } }, { - name: "keyword search", - searchURL: base, + name: "keyword search with alias", + searchURL: base + "&hsimp=yhs-002", run: function () { gURLBar.value = "y foo"; gURLBar.focus(); @@ -58,7 +58,7 @@ function test() { }, { name: "search bar search", - searchURL: base, + searchURL: base + "&hsimp=yhs-001", run: function () { let sb = BrowserSearch.searchBar; sb.focus(); @@ -71,7 +71,7 @@ function test() { }, { name: "new tab search", - searchURL: base, + searchURL: base + "&hsimp=yhs-004", run: function () { function doSearch(doc) { // Re-add the listener, and perform a search diff --git a/browser/locales/en-US/searchplugins/yahoo.xml b/browser/locales/en-US/searchplugins/yahoo.xml index 6073f2829a65..96448c8d6fbf 100644 --- a/browser/locales/en-US/searchplugins/yahoo.xml +++ b/browser/locales/en-US/searchplugins/yahoo.xml @@ -20,6 +20,10 @@ - + + + + +