Bug 862148 - remove the DATA_* and TYPE_* constants from nsISearchEngine, r=adw.
authorFlorian Quèze <florian@queze.net>
Wed, 23 Sep 2015 12:05:37 +0200
changeset 264078 b2fd64120dab85e0dce4a6f2286227e7ccd1ef40
parent 264077 e5a6f8ea2ff46d1caa7ef0b8c4f9bf7c3c66ea8e
child 264079 1b51fa918ebf2d84b1338a99a1b2f4f6568255b7
push id65512
push userkwierso@gmail.com
push dateWed, 23 Sep 2015 20:23:51 +0000
treeherdermozilla-inbound@b00078e693a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs862148
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 862148 - remove the DATA_* and TYPE_* constants from nsISearchEngine, r=adw.
browser/base/content/test/general/browser_aboutHome.js
browser/base/content/test/general/browser_contentSearchUI.js
browser/base/content/test/general/browser_keywordSearch_postData.js
browser/base/content/test/general/head.js
browser/base/content/test/newtab/browser_newtab_search.js
browser/components/search/content/search.xml
browser/components/search/test/browser_426329.js
browser/components/search/test/browser_483086.js
browser/components/search/test/browser_addEngine.js
browser/components/search/test/browser_amazon.js
browser/components/search/test/browser_bing.js
browser/components/search/test/browser_contextmenu.js
browser/components/search/test/browser_eBay.js
browser/components/search/test/browser_google.js
browser/components/search/test/browser_healthreport.js
browser/components/search/test/browser_hiddenOneOffs_cleanup.js
browser/components/search/test/browser_private_search_perwindowpb.js
browser/components/search/test/browser_yahoo.js
browser/components/search/test/head.js
browser/modules/test/browser_ContentSearch.js
netwerk/base/nsIBrowserSearchService.idl
toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
toolkit/components/search/nsSearchService.js
toolkit/components/search/tests/xpcshell/data/engineMaker.sjs
toolkit/components/search/tests/xpcshell/head_search.js
toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
toolkit/components/search/tests/xpcshell/test_json_cache.js
toolkit/components/search/tests/xpcshell/test_notifications.js
toolkit/components/search/tests/xpcshell/test_searchSuggest.js
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -270,17 +270,17 @@ var gTests = [
         deferred.resolve();
       });
     });
     Services.obs.addObserver(searchObserver, "browser-search-engine-modified", false);
     registerCleanupFunction(function () {
       Services.obs.removeObserver(searchObserver, "browser-search-engine-modified");
     });
     Services.search.addEngine("http://test:80/browser/browser/base/content/test/general/POSTSearchEngine.xml",
-                              Ci.nsISearchEngine.DATA_XML, null, false);
+                              null, null, false);
     return deferred.promise;
   }
 },
 
 {
   desc: "Make sure that a page can't imitate about:home",
   setup: function () { },
   run: function (aSnippetsMap)
@@ -654,17 +654,17 @@ function promiseContentSearchChange(newE
     });
   });
 }
 
 function promiseNewEngine(basename) {
   info("Waiting for engine to be added: " + basename);
   let addDeferred = Promise.defer();
   let url = getRootDirectory(gTestPath) + basename;
-  Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "", false, {
+  Services.search.addEngine(url, null, "", false, {
     onSuccess: function (engine) {
       info("Search engine added: " + basename);
       registerCleanupFunction(() => {
         try {
           Services.search.removeEngine(engine);
         } catch (ex) { /* Can't remove the engine more than once */ }
       });
       addDeferred.resolve(engine);
--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -189,42 +189,42 @@ add_task(function* cycleSuggestions() {
   yield setUp();
   yield msg("key", { key: "x", waitForSuggestions: true });
 
   let cycle = Task.async(function* (aSelectedButtonIndex) {
     let modifiers = {
       shiftKey: true,
       accelKey: true,
     };
-  
+
     let state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
     checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
     checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
-  
+
     state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
   });
-  
+
   yield cycle();
 
   // Repeat with a one-off selected.
   let state = yield msg("key", "VK_TAB");
   checkState(state, "x", ["xfoo", "xbar"], 2);
   yield cycle(0);
 
   // Repeat with the settings button selected.
@@ -684,17 +684,17 @@ function checkState(actualState, expecte
       str: sugg,
       type: "remote",
     };
   });
 
   if (expectedSelectedIdx == -1 && expectedSelectedButtonIdx != undefined) {
     expectedSelectedIdx = expectedSuggestions.length + expectedSelectedButtonIdx;
   }
-  
+
   let expectedState = {
     selectedIndex: expectedSelectedIdx,
     numSuggestions: expectedSuggestions.length,
     suggestionAtIndex: expectedSuggestions.map(s => s.str),
     isFormHistorySuggestionAtIndex:
       expectedSuggestions.map(s => s.type == "formHistory"),
 
     tableHidden: expectedSuggestions.length == 0,
@@ -754,39 +754,20 @@ function promiseMsg(name, type, msgMan) 
 }
 
 function setUpEngines() {
   return Task.spawn(function* () {
     info("Removing default search engines");
     let currentEngineName = Services.search.currentEngine.name;
     let currentEngines = Services.search.getVisibleEngines();
     info("Adding test search engines");
-    let engine1 = yield promiseNewEngine(TEST_ENGINE_BASENAME);
-    let engine2 = yield promiseNewEngine(TEST_ENGINE_2_BASENAME);
+    let engine1 = yield promiseNewSearchEngine(TEST_ENGINE_BASENAME);
+    let engine2 = yield promiseNewSearchEngine(TEST_ENGINE_2_BASENAME);
     Services.search.currentEngine = engine1;
     for (let engine of currentEngines) {
       Services.search.removeEngine(engine);
     }
     registerCleanupFunction(() => {
       Services.search.restoreDefaultEngines();
-      Services.search.removeEngine(engine1);
-      Services.search.removeEngine(engine2);
       Services.search.currentEngine = Services.search.getEngineByName(currentEngineName);
     });
   });
 }
-
-function promiseNewEngine(basename) {
-  info("Waiting for engine to be added: " + basename);
-  let addDeferred = Promise.defer();
-  let url = getRootDirectory(gTestPath) + basename;
-  Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "", false, {
-    onSuccess: function (engine) {
-      info("Search engine added: " + basename);
-      addDeferred.resolve(engine);
-    },
-    onError: function (errCode) {
-      ok(false, "addEngine failed with error code " + errCode);
-      addDeferred.reject();
-    },
-  });
-  return addDeferred.promise;
-}
--- a/browser/base/content/test/general/browser_keywordSearch_postData.js
+++ b/browser/base/content/test/general/browser_keywordSearch_postData.js
@@ -45,17 +45,17 @@ function test() {
 
   registerCleanupFunction(function () {
     gBrowser.removeTab(tab);
 
     Services.obs.removeObserver(searchObserver, "browser-search-engine-modified");
   });
 
   Services.search.addEngine("http://test:80/browser/browser/base/content/test/general/POSTSearchEngine.xml",
-                            Ci.nsISearchEngine.DATA_XML, null, false);
+                            null, null, false);
 }
 
 var gCurrTest;
 function nextTest() {
   if (gTests.length) {
     gCurrTest = gTests.shift();
     doTest();
   } else {
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -1028,18 +1028,17 @@ function promiseTopicObserved(aTopic)
       }, aTopic, false);
   });
 }
 
 function promiseNewSearchEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     let url = getRootDirectory(gTestPath) + basename;
-    Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "",
-                              false, {
+    Services.search.addEngine(url, null, "", false, {
       onSuccess: function (engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => Services.search.removeEngine(engine));
         resolve(engine);
       },
       onError: function (errCode) {
         Assert.ok(false, "addEngine failed with error code " + errCode);
         reject();
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -232,17 +232,17 @@ function promiseNewSearchEngine({name: b
   for (let i = 0; i < numLogos; i++) {
     expectedSearchEvents.push("CurrentState");
   }
   let eventPromise = promiseSearchEvents(expectedSearchEvents);
 
   // Wait for addEngine().
   let addDeferred = Promise.defer();
   let url = getRootDirectory(gTestPath) + basename;
-  Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "", false, {
+  Services.search.addEngine(url, null, "", false, {
     onSuccess: function (engine) {
       info("Search engine added: " + basename);
       gNewEngines.push(engine);
       addDeferred.resolve(engine);
     },
     onError: function (errCode) {
       ok(false, "addEngine failed with error code " + errCode);
       addDeferred.reject();
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -441,23 +441,21 @@
     </implementation>
 
     <handlers>
       <handler event="command"><![CDATA[
         const target = event.originalTarget;
         if (target.engine) {
           this.currentEngine = target.engine;
         } else if (target.classList.contains("addengine-item")) {
-          // We only detect OpenSearch files
-          var type = Ci.nsISearchEngine.DATA_XML;
           // Select the installed engine if the installation succeeds
           var installCallback = {
             onSuccess: engine => this.currentEngine = engine
           }
-          Services.search.addEngine(target.getAttribute("uri"), type,
+          Services.search.addEngine(target.getAttribute("uri"), null,
                                     target.getAttribute("src"), false,
                                     installCallback);
         }
         else
           return;
 
         this.focus();
         this.select();
@@ -1427,18 +1425,17 @@
             onSuccess: function(engine) {
               event.target.hidePopup();
               BrowserSearch.searchBar.openSuggestionsPanel();
             },
             onError: function(errorCode) {
               Components.utils.reportError("Error adding search engine: " + errorCode);
             }
           }
-          Services.search.addEngine(target.getAttribute("uri"),
-                                    Ci.nsISearchEngine.DATA_XML,
+          Services.search.addEngine(target.getAttribute("uri"), null,
                                     target.getAttribute("image"), false,
                                     installCallback);
         }
         let anonid = target.getAttribute("anonid");
         if (anonid == "search-one-offs-context-open-in-new-tab") {
           let searchbar = document.getElementById("searchbar");
           searchbar.handleSearchCommand(event, this._contextEngine, true);
         }
--- a/browser/components/search/test/browser_426329.js
+++ b/browser/components/search/test/browser_426329.js
@@ -94,18 +94,17 @@ function* promiseSetEngine() {
         Services.obs.removeObserver(observer, "browser-search-engine-modified");
         deferred.resolve();
         break;
     }
   };
 
   Services.obs.addObserver(observer, "browser-search-engine-modified", false);
   ss.addEngine("http://mochi.test:8888/browser/browser/components/search/test/426329.xml",
-               Ci.nsISearchEngine.DATA_XML, "data:image/x-icon,%00",
-               false);
+               null, "data:image/x-icon,%00", false);
 
   return deferred.promise;
 }
 
 function* promiseRemoveEngine() {
   let deferred = Promise.defer();
   var ss = Services.search;
 
--- a/browser/components/search/test/browser_483086.js
+++ b/browser/components/search/test/browser_483086.js
@@ -19,33 +19,31 @@ function test() {
         Services.obs.removeObserver(observer, "browser-search-engine-modified");
         test2();
         break;
     }
   }
 
   Services.obs.addObserver(observer, "browser-search-engine-modified", false);
   gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/483086-1.xml",
-                Ci.nsISearchEngine.DATA_XML, "data:image/x-icon;%00",
-                false);
+                null, "data:image/x-icon;%00", false);
 }
 
 function test2() {
   function observer(aSubject, aTopic, aData) {
     switch (aData) {
       case "engine-added":
         let engine = gSS.getEngineByName("483086b");
         ok(engine, "Test engine 2 installed");
         is(engine.searchForm, "http://example.com", "SearchForm is correct");
         gSS.removeEngine(engine);
         break;
-      case "engine-removed":  
+      case "engine-removed":
         Services.obs.removeObserver(observer, "browser-search-engine-modified");
         finish();
         break;
     }
   }
 
   Services.obs.addObserver(observer, "browser-search-engine-modified", false);
   gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/483086-2.xml",
-                Ci.nsISearchEngine.DATA_XML, "data:image/x-icon;%00",
-                false);
+                null, "data:image/x-icon;%00", false);
 }
--- a/browser/components/search/test/browser_addEngine.js
+++ b/browser/components/search/test/browser_addEngine.js
@@ -39,22 +39,21 @@ function checkEngine(checkObj, engineObj
 
 var gTests = [
   {
     name: "opensearch install",
     engine: {
       name: "Foo",
       alias: null,
       description: "Foo Search",
-      searchForm: "http://mochi.test:8888/browser/browser/components/search/test/",
-      type: Ci.nsISearchEngine.TYPE_OPENSEARCH
+      searchForm: "http://mochi.test:8888/browser/browser/components/search/test/"
     },
     run: function () {
       gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
-                    Ci.nsISearchEngine.DATA_XML, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
+                    null, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
                     false);
     },
     added: function (engine) {
       ok(engine, "engine was added.");
 
       checkEngine(this.engine, engine);
 
       let engineFromSS = gSS.getEngineByName(this.engine.name);
--- a/browser/components/search/test/browser_amazon.js
+++ b/browser/components/search/test/browser_amazon.js
@@ -25,17 +25,16 @@ function test() {
   is(url, "https://completion.amazon.com/search/complete?q=foo&search-alias=aps&mkt=1", "Check search suggestion URL for 'foo'");
 
   // Check all other engine properties.
   const EXPECTED_ENGINE = {
     name: "Amazon.com",
     alias: null,
     description: "Amazon.com Search",
     searchForm: "https://www.amazon.com/exec/obidos/external-search/?field-keywords=&mode=blended&tag=mozilla-20&sourceid=Mozilla-search",
-    type: Ci.nsISearchEngine.TYPE_MOZSEARCH,
     hidden: false,
     wrappedJSObject: {
       queryCharset: "UTF-8",
       "_iconURL": "data:image/x-icon;base64,AAABAAIAEBAAAAAAAAC0AQAAJgAAACAgAAAAAAAA6QIAANoBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAF7SURBVDjLlZPLasJAFIaFRF+iVV+h6hO0GF+gVB9AaHwDt64qCG03tQgtdCFIuyhUelmGli66MXThSt24kNiFBUlAYi6ezjnNxSuawB/ITP7v/HNmJgQAEaZzpgHs/gwcTyTEXuXl2U6nA8ViEbK5HKler28CVRAwnB9ptVrAh8MrQuCaZ4iA8fzIqSgCxwzpTIaSuN/RWGwdYLwCUBQFZFkGSZLgqdmEE7YEN8VOAKyaSKUW4nNBAFmnYiKZpDRX1WqwBBzP089n5f/NEQsFL4Wqqts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GiVxbWKHsz+O3vSOakqFQdsFgQeJUiKD7Wv9YKXBgCeSUC3v2kM5EJhlHDh3NcgcPlG1BXZu98sDmTuBa4fsMnz9fniJUaGzs+eMC540XuR0aDO2L8Y3qPyMcdOM+R/8XcqRA3qp9gAAAABJRU5ErkJggg==",
       _urls : [
         {
           type: "application/x-suggestions+json",
           method: "GET",
--- a/browser/components/search/test/browser_bing.js
+++ b/browser/components/search/test/browser_bing.js
@@ -35,17 +35,16 @@ function test() {
   is(url, "https://www.bing.com/osjson.aspx?query=foo&form=OSDJAS&language=" + getLocale(), "Check search suggestion URL for 'foo'");
 
   // Check all other engine properties.
   const EXPECTED_ENGINE = {
     name: "Bing",
     alias: null,
     description: "Bing. Search by Microsoft.",
     searchForm: "https://www.bing.com/search?q=&pc=MOZI",
-    type: Ci.nsISearchEngine.TYPE_MOZSEARCH,
     hidden: false,
     wrappedJSObject: {
       queryCharset: "UTF-8",
       "_iconURL": "data:image/x-icon;base64,AAABAAIAEBAAAAEACADaCwAAJgAAACAgAAABAAgAlAIAAAAMAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIAgAAAJCRaDYAAAAJcEhZcwAACxMAAAsTAQCanBgAAApPaUNDUFBob3Rvc2hvcCBJQ0MgcHJvZmlsZQAAeNqdU2dUU+kWPffe9EJLiICUS29SFQggUkKLgBSRJiohCRBKiCGh2RVRwRFFRQQbyKCIA46OgIwVUSwMigrYB+Qhoo6Do4iKyvvhe6Nr1rz35s3+tdc+56zznbPPB8AIDJZIM1E1gAypQh4R4IPHxMbh5C5AgQokcAAQCLNkIXP9IwEA+H48PCsiwAe+AAF40wsIAMBNm8AwHIf/D+pCmVwBgIQBwHSROEsIgBQAQHqOQqYAQEYBgJ2YJlMAoAQAYMtjYuMAUC0AYCd/5tMAgJ34mXsBAFuUIRUBoJEAIBNliEQAaDsArM9WikUAWDAAFGZLxDkA2C0AMElXZkgAsLcAwM4QC7IACAwAMFGIhSkABHsAYMgjI3gAhJkAFEbyVzzxK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NzwIGBoa//xhXndFYfU4NUsnwcf6Ms7jmpPGQ1BoHpwUQcOOF0OT9RoayryJNr3Oz/ybRcCIsoBwMmkp/8FoAADmgy6ulKggYAAAAAElFTkSuQmCC",
       _urls : [
         {
           type: "application/x-suggestions+json",
           method: "GET",
--- a/browser/components/search/test/browser_contextmenu.js
+++ b/browser/components/search/test/browser_contextmenu.js
@@ -26,18 +26,17 @@ function test() {
         Services.obs.removeObserver(observer, "browser-search-engine-modified");
         finish();
         break;
     }
   }
 
   Services.obs.addObserver(observer, "browser-search-engine-modified", false);
   ss.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine_mozsearch.xml",
-               Ci.nsISearchEngine.DATA_XML, "data:image/x-icon,%00",
-               false);
+               null, "data:image/x-icon,%00", false);
 
   function startTest() {
     contextMenu = document.getElementById("contentAreaContextMenu");
     ok(contextMenu, "Got context menu XUL");
 
     doOnloadOnce(testContextMenu);
     let tab = gBrowser.selectedTab = gBrowser.addTab("data:text/plain;charset=utf8,test%20search");
     registerCleanupFunction(function () {
--- a/browser/components/search/test/browser_eBay.js
+++ b/browser/components/search/test/browser_eBay.js
@@ -25,17 +25,16 @@ function test() {
   is(url, "http://autosug.ebay.com/autosug?sId=0&kwd=foo&fmt=osr", "Check search suggestion URL for 'foo'");
 
   // Check all other engine properties.
   const EXPECTED_ENGINE = {
     name: "eBay",
     alias: null,
     description: "eBay - Online auctions",
     searchForm: "http://search.ebay.com/",
-    type: Ci.nsISearchEngine.TYPE_MOZSEARCH,
     hidden: false,
     wrappedJSObject: {
       queryCharset: "ISO-8859-1",
       "_iconURL": "data:image/x-icon;base64,AAABAAIAEBAAAAAAAAB6AQAAJgAAACAgAAAAAAAAQgMAAKABAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAFBSURBVDjLtZPdK0MBGIf3J5Babhx3rinFBWuipaUskX9DYvkopqgV90q5UJpyp0OKrUWM2VrRsS9D0zZKHGaOnW1nj4vtypVtPPe/533r9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bdGhjt/cEA5isyKsaz7jl3we7bg7Rqf6j0LoSldON4wWcqJDgQNGTN++l13vELA+MK6kKd6iryFOvxtidt9i5gO7owdjKJQliflNAU1pas6xQgnAzg1ux+lJEdILixNr0Pq9JUUA8NwVG9DM73G0jlcnh+V4BpjIWzJmIGQIjnXw5TiDuKSEwxurm3ITc8DNO51BnrLbIcsrW0dNA6RxgUKU1UdGVqLy5X6qGzTLvlnewiBZyGs3Yz6X8UeaYI3olvZDhzwLumZ+eHvooCCC0Q5VUsb4unwycM4YIDqA01tPqmgbzQr2EIYPECiPm33LYoDiZSsY9moh9O/Znoa4d9HkXtPg2pX/cPKCoRQ+ocZa4AAAAASUVORK5CYII=",
       _urls : [
         {
           type: "application/x-suggestions+json",
           method: "GET",
--- a/browser/components/search/test/browser_google.js
+++ b/browser/components/search/test/browser_google.js
@@ -41,17 +41,16 @@ function test() {
      "Check alternate domain");
 
   // Check all other engine properties.
   const EXPECTED_ENGINE = {
     name: "Google",
     alias: null,
     description: "Google Search",
     searchForm: "https://www.google.com/search?q=&ie=utf-8&oe=utf-8",
-    type: Ci.nsISearchEngine.TYPE_MOZSEARCH,
     hidden: false,
     wrappedJSObject: {
       queryCharset: "UTF-8",
       "_iconURL": "data:image/x-icon;base64,AAABAAIAEBAAAAAAAAB9AQAAJgAAACAgAAAAAAAA8gIAAKMBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAFESURBVDjLpZNJSwNBEIXnt4lE4kHxovgT9BDwJHqPy0HEEOJBiAuCRg+KUdC4QS4KrpC4gCBGE3NQ48JsnZ6eZ3UOM6gjaePhQU93v6+qq2q0pqgeJj2S8EdJT1hr0OxBtKCD5iEd8QxDYpvhvOBAuMDKURX9C9aPu4GA1GEVkzvMg10UBfYveWAWgYAP00V01fa+R9M2bA51wJvhIn3qR+ybt3D3JNQBE5sMjCIOLFpoHzOwdsLRO22qA6R6kiZiWwxUvy/PUQZIhYZ1vFM9cvcOOsYNdcBgysISd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ag2BsdNwQMHcC+M5kHFJX+YlPxpVlbCx2mZ5DzPI04k4kUwHHdskU3pH76iftG8yWlkAAAAAElFTkSuQmCC",
       _urls : [
         {
           type: "application/x-suggestions+json",
           method: "GET",
--- a/browser/components/search/test/browser_healthreport.js
+++ b/browser/components/search/test/browser_healthreport.js
@@ -91,19 +91,17 @@ function test() {
         Services.obs.removeObserver(observer, "browser-search-engine-modified");
         finish();
         break;
     }
   }
 
   Services.obs.addObserver(observer, "browser-search-engine-modified", false);
   Services.search.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
-                            Ci.nsISearchEngine.DATA_XML,
-                            "data:image/x-icon,%00",
-                            false);
+                            null, "data:image/x-icon,%00", false);
 
 }
 
 function resetPreferences() {
   let service = Components.classes["@mozilla.org/datareporting/service;1"]
                                   .getService(Components.interfaces.nsISupports)
                                   .wrappedJSObject;
   service.policy._prefs.resetBranch("datareporting.policy.");
--- a/browser/components/search/test/browser_hiddenOneOffs_cleanup.js
+++ b/browser/components/search/test/browser_hiddenOneOffs_cleanup.js
@@ -4,17 +4,17 @@
 const testPref = "Foo,FooDupe";
 
 function promiseNewEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     Services.search.init({
       onInitComplete: function() {
         let url = getRootDirectory(gTestPath) + basename;
-        Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "", false, {
+        Services.search.addEngine(url, null, "", false, {
           onSuccess: function (engine) {
             info("Search engine added: " + basename);
             resolve(engine);
           },
           onError: function (errCode) {
             ok(false, "addEngine failed with error code " + errCode);
             reject();
           }
--- a/browser/components/search/test/browser_private_search_perwindowpb.js
+++ b/browser/components/search/test/browser_private_search_perwindowpb.js
@@ -46,18 +46,17 @@ function test() {
       onSuccess: function (engine) {
         Services.search.currentEngine = engine;
         aCallback();
       },
       onError: function (errorCode) {
         ok(false, "failed to install engine: " + errorCode);
       }
     };
-    Services.search.addEngine(engineURL + "426329.xml",
-                              Ci.nsISearchEngine.DATA_XML,
+    Services.search.addEngine(engineURL + "426329.xml", null,
                               "data:image/x-icon,%00", false, installCallback);
   }
 
   function testOnWindow(aIsPrivate, aCallback) {
     let win = whenNewWindowLoaded({ private: aIsPrivate }, function() {
       waitForFocus(aCallback, win);
     });
     windowsToClose.push(win);
--- a/browser/components/search/test/browser_yahoo.js
+++ b/browser/components/search/test/browser_yahoo.js
@@ -25,17 +25,16 @@ function test() {
   is(url, "https://search.yahoo.com/sugg/ff?output=fxjson&appid=ffd&command=foo", "Check search suggestion URL for 'foo'");
 
   // Check all other engine properties.
   const EXPECTED_ENGINE = {
     name: "Yahoo",
     alias: null,
     description: "Yahoo Search",
     searchForm: "https://search.yahoo.com/yhs/search?p=&ei=UTF-8&hspart=mozilla",
-    type: Ci.nsISearchEngine.TYPE_MOZSEARCH,
     hidden: false,
     wrappedJSObject: {
       queryCharset: "UTF-8",
       "_iconURL": "data:image/x-icon;base64,AAABAAIAEBAAAAEACAA8DQAAJgAAACAgAAABAAgAowsAAGINAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAAJcEhZcwAACxMAAAsTAQCanBgAAApPaUNDUFBob3Rvc2hvcCBJQ0MgcHJvZmlsZQAAeNqdU2dUU+kWPffe9EJLiICUS29SFQggUkKLgBSRJiohCRBKiCGh2RVRwRFFRQQbyKCIA46OgIwVUSwMigrYB+Qhoo6Do4iKyvvhe6Nr1rz35s3+tdc+56zznbPPB8AIDJZIM1E1gAypQh4R4IPHxMbh5C5AgQokcAAQCLNkIXP9IwEA+H48PCsiwAe+AAF40wsIAMBNm8AwHIf/D+pCmVwBgIQBwHSROEsIgBQAQHqOQqYAQEYBgJ2YJlMAoAQAYMtjYuMAUC0AYCd/5tMAgJ34mXsBAFuUIRUBoJEAIBNliEQAaDsArM9WikUAWDAAFGZLxDkA2C0AMElXZkgAsLcAwM4QC7IACAwAMFGIhSkABHsAYMgjI3gAhJkAFEbyVzzxK64Q5yoAAHiZsjy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gDYCxbqTPDXki1srChi4R6lpQ+uDmVFDtkA5GH1qJEvQFgacqCFT37pyP+Y+DMJs0Y54NgbiIVn61jhEUrNARuNIi3vOQf8iUeQuNzILe4b/jFZ7RDYJhTbVRaJTxyWh8PgO93hQJCBsSa2GQyyoLlBzWDxgnm9l0JgADgNgVxElCH22xs4NCsaieSUyzWXaSTLDAPlGQB0Kt6JaqpzYjkJQT9id60aNwqZjVqlz9Kqp+JcfDjOAqhirNoCI6MelpVPAjZ/CbFv45Y9YNcicqDMKm/Xo/FPJdMlqZ9SIK7qSrrci9mbl6q3/DGQ5f7XuK347rgKeuMgiicEfLPmT0rGY1K5SdI/ryritlMbJrr/PZ8+I8qf9PF8qhMrT39QHfHLkhj/fz/bi+eb83F/VxX1b6jWvt6KdTs/AvvCmqXE235jAAAAAElFTkSuQmCC",
       _urls : [
         {
           type: "application/x-suggestions+json",
           method: "GET",
--- a/browser/components/search/test/head.js
+++ b/browser/components/search/test/head.js
@@ -141,17 +141,17 @@ function promiseNewEngine(basename, opti
     //Default the setAsCurrent option to true.
     let setAsCurrent =
       options.setAsCurrent == undefined ? true : options.setAsCurrent;
     info("Waiting for engine to be added: " + basename);
     Services.search.init({
       onInitComplete: function() {
         let url = getRootDirectory(gTestPath) + basename;
         let current = Services.search.currentEngine;
-        Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "", false, {
+        Services.search.addEngine(url, null, "", false, {
           onSuccess: function (engine) {
             info("Search engine added: " + basename);
             if (setAsCurrent) {
               Services.search.currentEngine = engine;
             }
             registerCleanupFunction(() => {
               if (setAsCurrent) {
                 Services.search.currentEngine = current;
--- a/browser/modules/test/browser_ContentSearch.js
+++ b/browser/modules/test/browser_ContentSearch.js
@@ -312,17 +312,17 @@ function waitForNewEngine(basename, numI
   for (let i = 0; i < numImages; i++) {
     expectedSearchEvents.push("CurrentState");
   }
   let eventPromises = expectedSearchEvents.map(e => waitForTestMsg(e));
 
   // Wait for addEngine().
   let addDeferred = Promise.defer();
   let url = getRootDirectory(gTestPath) + basename;
-  Services.search.addEngine(url, Ci.nsISearchEngine.TYPE_MOZSEARCH, "", false, {
+  Services.search.addEngine(url, null, "", false, {
     onSuccess: function (engine) {
       info("Search engine added: " + basename);
       addDeferred.resolve(engine);
     },
     onError: function (errCode) {
       ok(false, "addEngine failed with error code " + errCode);
       addDeferred.reject();
     },
--- a/netwerk/base/nsIBrowserSearchService.idl
+++ b/netwerk/base/nsIBrowserSearchService.idl
@@ -17,17 +17,17 @@ interface nsISearchSubmission : nsISuppo
   readonly attribute nsIInputStream postData;
 
   /**
    * The URI to submit a search to.
    */
   readonly attribute nsIURI uri;
 };
 
-[scriptable, uuid(65fd517b-6bda-4bac-bbe1-42de1b3a7df6)]
+[scriptable, uuid(620bd920-0491-48c8-99a8-d6047e64802d)]
 interface nsISearchEngine : nsISupports
 {
   /**
    * Gets a nsISearchSubmission object that contains information about what to
    * send to the search engine, including the URI and postData, if applicable.
    *
    * @param  data
    *         Data to add to the submission object.
@@ -111,29 +111,16 @@ interface nsISearchEngine : nsISupports
    *         {window} the content window for the window performing the search
    *
    * @throws NS_ERROR_INVALID_ARG if options is omitted or lacks required
    *         elemeents
    */
   void speculativeConnect(in jsval options);
 
   /**
-   * Supported search engine types.
-   */
-  const unsigned long TYPE_MOZSEARCH     = 1;
-  const unsigned long TYPE_SHERLOCK      = 2;
-  const unsigned long TYPE_OPENSEARCH    = 3;
-
-  /**
-   * Supported search engine data types.
-   */
-  const unsigned long DATA_XML     = 1;
-  const unsigned long DATA_TEXT    = 2;
-
-  /**
    * An optional shortcut alias for the engine.
    * When non-null, this is a unique identifier.
    */
   attribute AString alias;
 
   /**
    * A text description describing the engine.
    */
@@ -155,21 +142,16 @@ interface nsISearchEngine : nsISupports
   readonly attribute AString name;
 
   /**
    * A URL string pointing to the engine's search form.
    */
   readonly attribute AString searchForm;
 
   /**
-   * The search engine type.
-   */
-  readonly attribute long type;
-
-  /**
    * An optional unique identifier for this search engine within the context of
    * the distribution, as provided by the distributing entity.
    */
   readonly attribute AString identifier;
 
   /**
    * Gets a string representing the hostname from which search results for a
    * given responseType are returned, minus the leading "www." (if present).
@@ -309,18 +291,18 @@ interface nsIBrowserSearchService : nsIS
    *        value is false, the engine will be added to the list upon successful
    *        load, but it will not be selected as the current engine.
    *
    * @param callback
    *        A nsISearchInstallCallback that will be notified when the
    *        addition is complete, or if the addition fails. It will not be
    *        called if addEngine throws an exception.
    *
-   * @throws NS_ERROR_FAILURE if the type is invalid, or if the description
-   *         file cannot be successfully loaded.
+   * @throws NS_ERROR_FAILURE if the description file cannot be successfully
+   *         loaded.
    */
   void addEngine(in AString engineURL, in long dataType, in AString iconURL,
                  in boolean confirm, [optional] in nsISearchInstallCallback callback);
 
   /**
    * Adds a new search engine, without asking the user for confirmation and
    * without starting to use it right away.
    *
--- a/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
+++ b/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
@@ -437,18 +437,17 @@ function* addTestEngine(basename, httpSe
       }
 
       Services.obs.removeObserver(obs, "browser-search-engine-modified");
       do_register_cleanup(() => Services.search.removeEngine(engine));
       resolve(engine);
     }, "browser-search-engine-modified", false);
 
     do_print("Adding engine from URL: " + dataUrl + basename);
-    Services.search.addEngine(dataUrl + basename,
-                              Ci.nsISearchEngine.DATA_XML, null, false);
+    Services.search.addEngine(dataUrl + basename, null, null, false);
   });
 }
 
 // Ensure we have a default search engine and the keyword.enabled preference
 // set.
 add_task(function ensure_search_engine() {
   // keyword.enabled is necessary for the tests to see keyword searches.
   Services.prefs.setBoolPref("keyword.enabled", true);
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -92,19 +92,16 @@ const SEARCH_SERVICE_TOPIC       = "brow
  */
 const SEARCH_SERVICE_METADATA_WRITTEN  = "write-metadata-to-disk-complete";
 
 /**
  * Sent whenever the cache is fully written to disk.
  */
 const SEARCH_SERVICE_CACHE_WRITTEN  = "write-cache-to-disk-complete";
 
-const SEARCH_TYPE_MOZSEARCH      = Ci.nsISearchEngine.TYPE_MOZSEARCH;
-const SEARCH_TYPE_OPENSEARCH     = Ci.nsISearchEngine.TYPE_OPENSEARCH;
-
 // Delay for lazy serialization (ms)
 const LAZY_SERIALIZE_DELAY = 100;
 
 // Delay for batching invalidation of the JSON cache (ms)
 const CACHE_INVALIDATION_DELAY = 1000;
 
 // Current cache version. This should be incremented if the format of the cache
 // file is modified.
@@ -858,39 +855,16 @@ function getVerificationHash(aName) {
   let hasher = Cc["@mozilla.org/security/hash;1"]
                  .createInstance(Ci.nsICryptoHash);
   hasher.init(hasher.SHA256);
   hasher.update(data, data.length);
 
   return hasher.finish(true);
 }
 
-
-/**
- * Used to verify a given DOM node's localName and namespaceURI.
- * @param aElement
- *        The element to verify.
- * @param aLocalNameArray
- *        An array of strings to compare against aElement's localName.
- * @param aNameSpaceArray
- *        An array of strings to compare against aElement's namespaceURI.
- *
- * @returns false if aElement is null, or if its localName or namespaceURI
- *          does not match one of the elements in the aLocalNameArray or
- *          aNameSpaceArray arrays, respectively.
- * @throws NS_ERROR_INVALID_ARG if aLocalNameArray or aNameSpaceArray are null.
- */
-function checkNameSpace(aElement, aLocalNameArray, aNameSpaceArray) {
-  if (!aLocalNameArray || !aNameSpaceArray)
-    FAIL("missing aLocalNameArray or aNameSpaceArray for checkNameSpace");
-  return (aElement                                                &&
-          (aLocalNameArray.indexOf(aElement.localName)    != -1)  &&
-          (aNameSpaceArray.indexOf(aElement.namespaceURI) != -1));
-}
-
 /**
  * Safely close a nsISafeOutputStream.
  * @param aFOS
  *        The file output stream to close.
  */
 function closeSafeOutputStream(aFOS) {
   if (aFOS instanceof Ci.nsISafeOutputStream) {
     try {
@@ -1421,18 +1395,16 @@ Engine.prototype = {
   },
   // Set to true if the engine has a preferred icon (an icon that should not be
   // overridden by a non-preferred icon).
   _hasPreferredIcon: null,
   // Whether the engine is hidden from the user.
   _hidden: null,
   // The engine's name.
   _name: null,
-  // The engine type. See engine types (TYPE_) defined above.
-  _type: null,
   // The name of the charset used to submit the search terms.
   _queryCharset: null,
   // The engine's raw SearchForm value (URL string pointing to a search form).
   __searchForm: null,
   get _searchForm() {
     return this.__searchForm;
   },
   set _searchForm(aValue) {
@@ -1964,31 +1936,24 @@ Engine.prototype = {
 
   /**
    * Initialize this Engine object from the collected data.
    */
   _initFromData: function SRCH_ENG_initFromData() {
     ENSURE_WARN(this._data, "Can't init an engine with no data!",
                 Cr.NS_ERROR_UNEXPECTED);
 
-    // Find out what type of engine we are
-    if (checkNameSpace(this._data, [MOZSEARCH_LOCALNAME],
-        [MOZSEARCH_NS_10])) {
-
-      LOG("_init: Initing MozSearch plugin from " + this._location);
-
-      this._type = SEARCH_TYPE_MOZSEARCH;
-      this._parse();
-
-    } else if (checkNameSpace(this._data, [OPENSEARCH_LOCALNAME],
-                              OPENSEARCH_NAMESPACES)) {
-
-      LOG("_init: Initing OpenSearch plugin from " + this._location);
-
-      this._type = SEARCH_TYPE_OPENSEARCH;
+    // Ensure we have a supported engine type before attempting to parse it.
+    let element = this._data;
+    if ((element.localName == MOZSEARCH_LOCALNAME &&
+         element.namespaceURI == MOZSEARCH_NS_10) ||
+        (element.localName == OPENSEARCH_LOCALNAME &&
+         OPENSEARCH_NAMESPACES.indexOf(element.namespaceURI) != -1)) {
+      LOG("_init: Initing search plugin from " + this._location);
+
       this._parse();
 
     } else
       FAIL(this._location + " is not a valid search plugin.", Cr.NS_ERROR_FAILURE);
 
     // No need to keep a ref to our data (which in some cases can be a document
     // element) past this point
     this._data = null;
@@ -2202,17 +2167,16 @@ Engine.prototype = {
     this.__id = aJson._id;
     this._name = aJson._name;
     this._description = aJson.description;
     if (aJson._hasPreferredIcon == undefined)
       this._hasPreferredIcon = true;
     else
       this._hasPreferredIcon = false;
     this._hidden = aJson._hidden;
-    this._type = aJson.type || SEARCH_TYPE_MOZSEARCH;
     this._queryCharset = aJson.queryCharset || DEFAULT_QUERY_CHARSET;
     this.__searchForm = aJson.__searchForm;
     this.__installLocation = aJson._installLocation || SEARCH_APP_DIR;
     this._updateInterval = aJson._updateInterval || null;
     this._updateURL = aJson._updateURL || null;
     this._iconUpdateURL = aJson._iconUpdateURL || null;
     if (aJson._readOnly == undefined)
       this._readOnly = true;
@@ -2261,18 +2225,16 @@ Engine.prototype = {
     if (this._updateInterval || !aFilter)
       json._updateInterval = this._updateInterval;
     if (this._updateURL || !aFilter)
       json._updateURL = this._updateURL;
     if (this._iconUpdateURL || !aFilter)
       json._iconUpdateURL = this._iconUpdateURL;
     if (!this._hasPreferredIcon || !aFilter)
       json._hasPreferredIcon = this._hasPreferredIcon;
-    if (this.type != SEARCH_TYPE_MOZSEARCH || !aFilter)
-      json.type = this.type;
     if (this.queryCharset != DEFAULT_QUERY_CHARSET || !aFilter)
       json.queryCharset = this.queryCharset;
     if (!this._readOnly || !aFilter)
       json._readOnly = this._readOnly;
     if (this._extensionID) {
       json.extensionID = this._extensionID;
     }
 
@@ -2646,20 +2608,16 @@ Engine.prototype = {
     let selfURL = this._getURLOfType(URLTYPE_OPENSEARCH, "self");
     return !!(this._updateURL || this._iconUpdateURL || selfURL);
   },
 
   get name() {
     return this._name;
   },
 
-  get type() {
-    return this._type;
-  },
-
   get searchForm() {
     return this._getSearchFormWithPurpose();
   },
 
   _getSearchFormWithPurpose(aPurpose = "") {
     // First look for a <Url rel="searchform">
     var searchFormURL = this._getURLOfType(URLTYPE_SEARCH_HTML, "searchform");
     if (searchFormURL) {
--- a/toolkit/components/search/tests/xpcshell/data/engineMaker.sjs
+++ b/toolkit/components/search/tests/xpcshell/data/engineMaker.sjs
@@ -12,31 +12,22 @@ const { classes: Cc, interfaces: Ci, uti
 function handleRequest(request, response) {
   let engineData = JSON.parse(unescape(request.queryString).replace("+", " "));
 
   if (!engineData.baseURL) {
     response.setStatusLine(request.httpVersion, 500, "baseURL required");
     return;
   }
 
-  engineData.engineType = engineData.engineType || Ci.nsISearchEngine.TYPE_OPENSEARCH;
   engineData.name = engineData.name || "Generated test engine";
   engineData.description = engineData.description || "Generated test engine description";
   engineData.method = engineData.method || "GET";
 
   response.setStatusLine(request.httpVersion, 200, "OK");
-
-  switch (engineData.engineType) {
-    case Ci.nsISearchEngine.TYPE_OPENSEARCH:
-      createOpenSearchEngine(response, engineData);
-      break;
-    default:
-      response.setStatusLine(request.httpVersion, 404, "Unsupported engine type");
-      break;
-  }
+  createOpenSearchEngine(response, engineData);
 }
 
 /**
  * Create an OpenSearch engine for the given base URL.
  */
 function createOpenSearchEngine(response, engineData) {
   let params = "", queryString = "";
   if (engineData.method == "POST") {
--- a/toolkit/components/search/tests/xpcshell/head_search.js
+++ b/toolkit/components/search/tests/xpcshell/head_search.js
@@ -418,17 +418,17 @@ var addTestEngines = Task.async(function
           resolve();
         } catch (ex) {
           reject(ex);
         }
       }, "browser-search-engine-modified", false);
 
       if (item.xmlFileName) {
         Services.search.addEngine(gDataUrl + item.xmlFileName,
-                                  Ci.nsISearchEngine.DATA_XML, null, false);
+                                  null, null, false);
       } else {
         Services.search.addEngineWithDetails(item.name, ...item.details);
       }
     });
   }
 
   return engines;
 });
--- a/toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
+++ b/toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
@@ -42,54 +42,51 @@ add_test(function simple_callback_test()
       do_check_true(!!engine);
       do_check_neq(engine.name, Services.search.defaultEngine.name);
       run_next_test();
     },
     onError: function (errorCode) {
       do_throw("search callback returned error: " + errorCode);
     }
   }
-  Services.search.addEngine(gDataUrl + "engine.xml",
-                            Ci.nsISearchEngine.DATA_XML,
+  Services.search.addEngine(gDataUrl + "engine.xml", null,
                             null, false, searchCallback);
 });
 
 // Test of the search callback on duplicate engine failures
 add_test(function duplicate_failure_test() {
   let searchCallback = {
     onSuccess: function (engine) {
       do_throw("this addition should not have succeeded");
     },
     onError: function (errorCode) {
       do_check_true(!!errorCode);
       do_check_eq(errorCode, Ci.nsISearchInstallCallback.ERROR_DUPLICATE_ENGINE);
       run_next_test();
     }
   }
   // Re-add the same engine added in the previous test
-  Services.search.addEngine(gDataUrl + "engine.xml",
-                            Ci.nsISearchEngine.DATA_XML,
+  Services.search.addEngine(gDataUrl + "engine.xml", null,
                             null, false, searchCallback);
 });
 
 // Test of the search callback on failure to load the engine failures
 add_test(function load_failure_test() {
   let searchCallback = {
     onSuccess: function (engine) {
       do_throw("this addition should not have succeeded");
     },
     onError: function (errorCode) {
       do_check_true(!!errorCode);
       do_check_eq(errorCode, Ci.nsISearchInstallCallback.ERROR_UNKNOWN_FAILURE);
       run_next_test();
     }
   }
   // Try adding an engine that doesn't exist
-  Services.search.addEngine("http://invalid/data/engine.xml",
-                            Ci.nsISearchEngine.DATA_XML,
+  Services.search.addEngine("http://invalid/data/engine.xml", null,
                             null, false, searchCallback);
 });
 
 function run_test() {
   updateAppInfo();
   useHttpServer();
 
   run_next_test();
--- a/toolkit/components/search/tests/xpcshell/test_json_cache.js
+++ b/toolkit/components/search/tests/xpcshell/test_json_cache.js
@@ -231,17 +231,16 @@ add_test(function test_cache_write() {
 });
 
 var EXPECTED_ENGINE = {
   engine: {
     name: "Test search engine",
     alias: null,
     description: "A test search engine (based on Google search)",
     searchForm: "http://www.google.com/",
-    type: Ci.nsISearchEngine.TYPE_MOZSEARCH,
     wrappedJSObject: {
       _extensionID: "test-addon-id@mozilla.org",
       "_iconURL": "data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA",
       _urls : [
         {
           type: "application/x-suggestions+json",
           method: "GET",
           template: "http://suggestqueries.google.com/complete/search?output=firefox&client=firefox" +
--- a/toolkit/components/search/tests/xpcshell/test_notifications.js
+++ b/toolkit/components/search/tests/xpcshell/test_notifications.js
@@ -63,12 +63,10 @@ function run_test() {
   do_register_cleanup(function cleanup() {
     Services.obs.removeObserver(search_observer, "browser-search-engine-modified");
   });
 
   do_test_pending();
 
   Services.obs.addObserver(search_observer, "browser-search-engine-modified", false);
 
-  Services.search.addEngine(gDataUrl + "engine.xml",
-                            Ci.nsISearchEngine.DATA_XML,
-                            null, false);
+  Services.search.addEngine(gDataUrl + "engine.xml", null, null, false);
 }
--- a/toolkit/components/search/tests/xpcshell/test_searchSuggest.js
+++ b/toolkit/components/search/tests/xpcshell/test_searchSuggest.js
@@ -31,31 +31,28 @@ function run_test() {
   }));
 
   run_next_test();
 }
 
 add_task(function* add_test_engines() {
   let getEngineData = {
     baseURL: gDataUrl,
-    engineType: Ci.nsISearchEngine.TYPE_OPENSEARCH,
     name: "GET suggestion engine",
     method: "GET",
   };
 
   let postEngineData = {
     baseURL: gDataUrl,
-    engineType: Ci.nsISearchEngine.TYPE_OPENSEARCH,
     name: "POST suggestion engine",
     method: "POST",
   };
 
   let unresolvableEngineData = {
     baseURL: "http://example.invalid/",
-    engineType: Ci.nsISearchEngine.TYPE_OPENSEARCH,
     name: "Offline suggestion engine",
     method: "GET",
   };
 
   [getEngine, postEngine, unresolvableEngine] = yield addTestEngines([
     {
       name: getEngineData.name,
       xmlFileName: "engineMaker.sjs?" + JSON.stringify(getEngineData),