bug 995390 - make bing/yahoo codes consistent across channels, r=gavin

--HG--
extra : rebase_source : 0b8711d655edf1ecf45776fdff1edfa421da1403
This commit is contained in:
Mike Connor 2014-04-14 15:49:39 -04:00
parent e04a4fd6c3
commit ae64c2dd80
7 changed files with 18 additions and 33 deletions

View File

@ -26,11 +26,9 @@ pref("app.update.url.details", "https://www.mozilla.org/firefox/aurora/");
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 2);
// Search codes belong only in builds with official branding
pref("browser.search.param.yahoo-fr", "");
pref("browser.search.param.yahoo-fr-cjkt", ""); // now unused
pref("browser.search.param.yahoo-fr-ja", "");
pref("browser.search.param.yahoo-f-CN", "");
// code usage depends on contracts, please contact the Firefox module owner if you have questions
pref("browser.search.param.yahoo-fr", "moz35");
pref("browser.search.param.yahoo-fr-ja", "mozff");
#ifdef MOZ_METRO
pref("browser.search.param.yahoo-fr-metro", "");
#endif

View File

@ -23,11 +23,9 @@ pref("app.update.url.details", "https://nightly.mozilla.org");
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 2);
// Search codes belong only in builds with official branding
pref("browser.search.param.yahoo-fr", "");
pref("browser.search.param.yahoo-fr-cjkt", ""); // now unused
pref("browser.search.param.yahoo-fr-ja", "");
pref("browser.search.param.yahoo-f-CN", "");
// code usage depends on contracts, please contact the Firefox module owner if you have questions
pref("browser.search.param.yahoo-fr", "moz35");
pref("browser.search.param.yahoo-fr-ja", "mozff");
#ifdef MOZ_METRO
pref("browser.search.param.yahoo-fr-metro", "");
#endif

View File

@ -23,9 +23,8 @@ pref("app.update.url.details", "https://www.mozilla.org/%LOCALE%/firefox/notes")
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 63);
pref("browser.search.param.ms-pc", "MOZI");
// code usage depends on contracts, please contact the Firefox module owner if you have questions
pref("browser.search.param.yahoo-fr", "moz35");
pref("browser.search.param.yahoo-fr-cjkt", "moz35"); // now unused
pref("browser.search.param.yahoo-fr-ja", "mozff");
#ifdef MOZ_METRO
pref("browser.search.param.ms-pc-metro", "MOZW");

View File

@ -23,11 +23,9 @@ pref("app.update.url.details", "https://nightly.mozilla.org");
// app.update.checkInstallTime is true.
pref("app.update.checkInstallTime.days", 2);
// Search codes belong only in builds with official branding
pref("browser.search.param.yahoo-fr", "");
pref("browser.search.param.yahoo-fr-cjkt", ""); // now unused
pref("browser.search.param.yahoo-fr-ja", "");
pref("browser.search.param.yahoo-f-CN", "");
// code usage depends on contracts, please contact the Firefox module owner if you have questions
pref("browser.search.param.yahoo-fr", "moz35");
pref("browser.search.param.yahoo-fr-ja", "mozff");
#ifdef MOZ_METRO
pref("browser.search.param.yahoo-fr-metro", "");
#endif

View File

@ -9,18 +9,11 @@
const BROWSER_SEARCH_PREF = "browser.search.";
let runtime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);
// Custom search parameters
const PC_PARAM_VALUE = runtime.isOfficialBranding ? "MOZI" : null;
function test() {
let engine = Services.search.getEngineByName("Bing");
ok(engine, "Bing");
let base = "http://www.bing.com/search?q=foo";
if (typeof(PC_PARAM_VALUE) == "string")
base += "&pc=" + PC_PARAM_VALUE;
let base = "http://www.bing.com/search?q=foo&pc=MOZI";
let url;
// Test search URLs (including purposes).
@ -85,6 +78,11 @@ function test() {
value: "{searchTerms}",
purpose: undefined,
},
{
name: "pc",
value: "MOZI",
purpose: undefined,
},
{
name: "form",
value: "MOZCON",

View File

@ -9,9 +9,6 @@
const BROWSER_SEARCH_PREF = "browser.search.";
let runtime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);
// Custom search parameters
const PC_PARAM_VALUE = runtime.isOfficialBranding ? "MOZI" : null;
function test() {
let engine = Services.search.getEngineByName("Bing");
@ -20,10 +17,7 @@ function test() {
let previouslySelectedEngine = Services.search.currentEngine;
Services.search.currentEngine = engine;
let base = "http://www.bing.com/search?q=foo";
if (typeof(PC_PARAM_VALUE) == "string")
base += "&pc=" + PC_PARAM_VALUE;
let base = "http://www.bing.com/search?q=foo&pc=MOZI";
let url;
// Test search URLs (including purposes).

View File

@ -16,7 +16,7 @@
</Url>
<Url type="text/html" method="GET" template="http://www.bing.com/search">
<Param name="q" value="{searchTerms}"/>
<MozParam name="pc" condition="pref" pref="ms-pc"/>
<Param name="pc" value="MOZI"/>
<MozParam name="form" condition="purpose" purpose="contextmenu" value="MOZCON"/>
<MozParam name="form" condition="purpose" purpose="searchbar" value="MOZSBR"/>
<MozParam name="form" condition="purpose" purpose="homepage" value="MOZSPG"/>