Bug 962490 - Add a search field to the new tab page (new Bing search parameter). r=gavin
authorDrew Willcoxon <adw@mozilla.com>
Fri, 25 Apr 2014 10:25:11 -0700
changeset 180677 8e88761369745a12229f7bb8253f0d60d2a37037
parent 180676 c7ea1a75bfecc8b1c7c0f6e6d74a808c1100b219
child 180678 ef18d9fd18a1cf2f199f39a77026745ba8ecfbbd
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersgavin
bugs962490
milestone31.0a1
Bug 962490 - Add a search field to the new tab page (new Bing search parameter). r=gavin
browser/components/search/test/browser_bing.js
browser/components/search/test/browser_bing_behavior.js
browser/locales/en-US/searchplugins/bing.xml
--- a/browser/components/search/test/browser_bing.js
+++ b/browser/components/search/test/browser_bing.js
@@ -98,16 +98,21 @@ function test() {
               value: "MOZSPG",
               purpose: "homepage",
             },
             {
               name: "form",
               value: "MOZLBR",
               purpose:"keyword",
             },
+            {
+              name: "form",
+              value: "MOZTSB",
+              purpose: "newtab",
+            },
           ],
           mozparams: {},
         },
       ],
     },
   };
 
   isSubObjectOf(EXPECTED_ENGINE, engine, "Bing");
--- a/browser/components/search/test/browser_bing_behavior.js
+++ b/browser/components/search/test/browser_bing_behavior.js
@@ -62,17 +62,17 @@ function test() {
         registerCleanupFunction(function () {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
-      searchURL: base,
+      searchURL: base + "&form=MOZTSB",
       run: function () {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
--- a/browser/locales/en-US/searchplugins/bing.xml
+++ b/browser/locales/en-US/searchplugins/bing.xml
@@ -14,11 +14,12 @@
     </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"/>
         <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"/>
         <MozParam name="form" condition="purpose" purpose="keyword" value="MOZLBR"/>
+        <MozParam name="form" condition="purpose" purpose="newtab" value="MOZTSB"/>
     </Url>
     <SearchForm>http://www.bing.com/search</SearchForm>
 </SearchPlugin>