Backed out bug 841554 under suspicion of causing mochitest b-c failures. a=backout
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 28 Mar 2013 12:57:30 -0400
changeset 128712 dc9bc44e7f1ce0984f657ec5e76f4816583ac182
parent 128711 ac5ed16b6a744194905111a812b6cd92da1de8f7
child 128713 643f2a7549727e02c2cd5fc348c94fb6ecddf2da
push id3565
push userryanvm@gmail.com
push dateThu, 28 Mar 2013 16:57:22 +0000
treeherdermozilla-aurora@dc9bc44e7f1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs841554
milestone21.0a2
Backed out bug 841554 under suspicion of causing mochitest b-c failures. a=backout
netwerk/base/public/nsIBrowserSearchService.idl
services/healthreport/providers.jsm
services/healthreport/tests/xpcshell/test_provider_searches.js
services/metrics/dataprovider.jsm
services/metrics/tests/xpcshell/test_metrics_provider.js
toolkit/components/search/nsSearchService.js
toolkit/components/search/tests/xpcshell/test_identifiers.js
toolkit/components/search/tests/xpcshell/xpcshell.ini
--- a/netwerk/base/public/nsIBrowserSearchService.idl
+++ b/netwerk/base/public/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(ccf6aa20-10a9-4a0c-a81d-31b10ea846de)]
+[scriptable, uuid(6839f025-2e25-408e-892e-c2c2fa5650c5)]
 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.
@@ -127,22 +127,16 @@ interface nsISearchEngine : nsISupports
    */
   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;
-
 };
 
 /**
  * Callback for asynchronous initialization of nsIBrowserSearchService
  */
 [scriptable, function, uuid(02256156-16e4-47f1-9979-76ff98ceb590)]
 interface nsIBrowserSearchInitObserver : nsISupports
 {
--- a/services/healthreport/providers.jsm
+++ b/services/healthreport/providers.jsm
@@ -1018,21 +1018,25 @@ PlacesProvider.prototype = Object.freeze
     PlacesDBUtils.telemetry(null, function onResult(data) {
       deferred.resolve(data);
     });
 
     return deferred.promise;
   },
 });
 
-function SearchCountMeasurement1() {
+
+/**
+ * Records search counts per day per engine and where search initiated.
+ */
+function SearchCountMeasurement() {
   Metrics.Measurement.call(this);
 }
 
-SearchCountMeasurement1.prototype = Object.freeze({
+SearchCountMeasurement.prototype = Object.freeze({
   __proto__: Metrics.Measurement.prototype,
 
   name: "counts",
   version: 1,
 
   // We only record searches for search engines that have partner agreements
   // with Mozilla.
   fields: {
@@ -1052,216 +1056,24 @@ SearchCountMeasurement1.prototype = Obje
     "yahoo.contextmenu": DAILY_COUNTER_FIELD,
     "yahoo.searchbar": DAILY_COUNTER_FIELD,
     "yahoo.urlbar": DAILY_COUNTER_FIELD,
     "other.abouthome": DAILY_COUNTER_FIELD,
     "other.contextmenu": DAILY_COUNTER_FIELD,
     "other.searchbar": DAILY_COUNTER_FIELD,
     "other.urlbar": DAILY_COUNTER_FIELD,
   },
-});
 
-/**
- * Records search counts per day per engine and where search initiated.
- *
- * We want to record granular details for individual locale-specific search
- * providers, but only if they're Mozilla partners. In order to do this, we
- * track the nsISearchEngine identifier, which denotes shipped search engines,
- * and intersect those with our partner list.
- *
- * We don't use the search engine name directly, because it is shared across
- * locales; e.g., eBay-de and eBay both share the name "eBay".
- */
-function SearchCountMeasurement2() {
-  this._fieldSpecs = null;
-  this._interestingEngines = null;   // Name -> ID. ("Amazon.com" -> "amazondotcom")
-
-  Metrics.Measurement.call(this);
-}
-
-SearchCountMeasurement2.prototype = Object.freeze({
-  __proto__: Metrics.Measurement.prototype,
-
-  name: "counts",
-  version: 2,
-
-  /**
-   * Default implementation; can be overridden by test helpers.
-   */
-  getDefaultEngines: function () {
-    return Services.search.getDefaultEngines();
-  },
-
-  _initialize: function () {
-    // Don't create all of these for every profile.
-    // There are 61 partner engines, translating to 244 fields.
-    // Instead, compute only those that are possible -- those for whom the
-    // provider is one of the default search engines.
-    // This set can grow over time, and change as users run different localized
-    // Firefox instances.
-    this._fieldSpecs = {};
-    this._interestingEngines = {};
-
-    for (let source of this.SOURCES) {
-      this._fieldSpecs["other." + source] = DAILY_COUNTER_FIELD;
-    }
-
-    let engines = this.getDefaultEngines();
-    for (let engine of engines) {
-      let id = engine.identifier;
-      if (!id || (this.PROVIDERS.indexOf(id) == -1)) {
-        continue;
-      }
-
-      this._interestingEngines[engine.name] = id;
-      let fieldPrefix = id + ".";
-      for (let source of this.SOURCES) {
-        this._fieldSpecs[fieldPrefix + source] = DAILY_COUNTER_FIELD;
-      }
-    }
-  },
-
-  // Our fields are dynamic, so we compute them into _fieldSpecs by looking at
-  // the current set of interesting engines.
-  get fields() {
-    if (!this._fieldSpecs) {
-      this._initialize();
-    }
-    return this._fieldSpecs;
-  },
-
-  get interestingEngines() {
-    if (!this._fieldSpecs) {
-      this._initialize();
-    }
-    return this._interestingEngines;
-  },
-
-  /**
-   * Override the default behavior: serializers should include every counter
-   * field from the DB, even if we don't currently have it registered.
-   *
-   * Do this so we don't have to register several hundred fields to match
-   * various Firefox locales.
-   *
-   * We use the "provider.type" syntax as a rudimentary check for validity.
-   *
-   * We trust that measurement versioning is sufficient to exclude old provider
-   * data.
-   */
-  shouldIncludeField: function (name) {
-    return name.indexOf(".") != -1;
-  },
-
-  /**
-   * The measurement type mechanism doesn't introspect the DB. Override it
-   * so that we can assume all unknown fields are counters.
-   */
-  fieldType: function (name) {
-    if (name in this.fields) {
-      return this.fields[name].type;
-    }
-
-    // Default to a counter.
-    return Metrics.Storage.FIELD_DAILY_COUNTER;
-  },
-
-  // You can compute the total list of fields by unifying the entire l10n repo
-  // set with the list of partners:
-  //
-  //   sort -u */*/searchplugins/list.txt | tr -d '^M' | uniq | grep -f partners.txt
-  //
-  // where partners.txt contains
-  //
-  //   amazon
-  //   aol
-  //   bing
-  //   eBay
-  //   google
-  //   mailru
-  //   mercadolibre
-  //   seznam
-  //   twitter
-  //   yahoo
-  //   yandex
-  //
-  // Please update this list as the set of partners changes.
-  //
-  PROVIDERS: [
-    "amazon-co-uk",
-    "amazon-de",
-    "amazon-en-GB",
-    "amazon-france",
-    "amazon-it",
-    "amazon-jp",
-    "amazondotcn",
-    "amazondotcom",
-    "amazondotcom-de",
-
-    "aol-en-GB",
-    "aol-web-search",
-
+  // If an engine is removed from this list, it may not be reported any more.
+  // Verify side-effects are sane before removing an entry.
+  PARTNER_ENGINES: [
+    "amazon.com",
     "bing",
-
-    "eBay",
-    "eBay-de",
-    "eBay-en-GB",
-    "eBay-es",
-    "eBay-fi",
-    "eBay-france",
-    "eBay-hu",
-    "eBay-in",
-    "eBay-it",
-
     "google",
-    "google-jp",
-    "google-ku",
-    "google-maps-zh-TW",
-
-    "mailru",
-
-    "mercadolibre-ar",
-    "mercadolibre-cl",
-    "mercadolibre-mx",
-
-    "seznam-cz",
-
-    "twitter",
-    "twitter-de",
-    "twitter-ja",
-
     "yahoo",
-    "yahoo-NO",
-    "yahoo-answer-zh-TW",
-    "yahoo-ar",
-    "yahoo-bid-zh-TW",
-    "yahoo-br",
-    "yahoo-ch",
-    "yahoo-cl",
-    "yahoo-de",
-    "yahoo-en-GB",
-    "yahoo-es",
-    "yahoo-fi",
-    "yahoo-france",
-    "yahoo-fy-NL",
-    "yahoo-id",
-    "yahoo-in",
-    "yahoo-it",
-    "yahoo-jp",
-    "yahoo-jp-auctions",
-    "yahoo-mx",
-    "yahoo-sv-SE",
-    "yahoo-zh-TW",
-
-    "yandex",
-    "yandex-ru",
-    "yandex-slovari",
-    "yandex-tr",
-    "yandex.by",
-    "yandex.ru-be",
   ],
 
   SOURCES: [
     "abouthome",
     "contextmenu",
     "searchbar",
     "urlbar",
   ],
@@ -1270,41 +1082,41 @@ SearchCountMeasurement2.prototype = Obje
 this.SearchesProvider = function () {
   Metrics.Provider.call(this);
 };
 
 this.SearchesProvider.prototype = Object.freeze({
   __proto__: Metrics.Provider.prototype,
 
   name: "org.mozilla.searches",
-  measurementTypes: [
-    SearchCountMeasurement1,
-    SearchCountMeasurement2,
-  ],
+  measurementTypes: [SearchCountMeasurement],
 
   /**
    * Record that a search occurred.
    *
    * @param engine
    *        (string) The search engine used. If the search engine is unknown,
    *        the search will be attributed to "other".
    * @param source
    *        (string) Where the search was initiated from. Must be one of the
-   *        SearchCountMeasurement2.SOURCES values.
+   *        SearchCountMeasurement.SOURCES values.
    *
    * @return Promise<>
    *         The promise is resolved when the storage operation completes.
    */
   recordSearch: function (engine, source) {
-    let m = this.getMeasurement("counts", 2);
+    let m = this.getMeasurement("counts", 1);
 
     if (m.SOURCES.indexOf(source) == -1) {
       throw new Error("Unknown source for search: " + source);
     }
 
-    let id = m.interestingEngines[engine] || "other";
-    let field = id + "." + source;
+    let normalizedEngine = engine.toLowerCase();
+    if (m.PARTNER_ENGINES.indexOf(normalizedEngine) == -1) {
+      normalizedEngine = "other";
+    }
+
     return this.enqueueStorageOperation(function recordSearch() {
-      return m.incrementDailyCounter(field);
+      return m.incrementDailyCounter(normalizedEngine + "." + source);
     });
   },
 });
 
--- a/services/healthreport/tests/xpcshell/test_provider_searches.js
+++ b/services/healthreport/tests/xpcshell/test_provider_searches.js
@@ -1,123 +1,75 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const {utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Metrics.jsm");
-let bsp = Cu.import("resource://gre/modules/services/healthreport/providers.jsm");
-
-const DEFAULT_ENGINES = [
-  {name: "Amazon.com",    identifier: "amazondotcom"},
-  {name: "Bing",          identifier: "bing"},
-  {name: "Google",        identifier: "google"},
-  {name: "Yahoo",         identifier: "yahoo"},
-  {name: "Foobar Search", identifier: "foobar"},
-];
+Cu.import("resource://gre/modules/services/healthreport/providers.jsm");
 
-function MockSearchCountMeasurement() {
-  bsp.SearchCountMeasurement2.call(this);
-}
-MockSearchCountMeasurement.prototype = {
-  __proto__: bsp.SearchCountMeasurement2.prototype,
-  getDefaultEngines: function () {
-    return DEFAULT_ENGINES;
-  },
-};
-
-function MockSearchesProvider() {
-  SearchesProvider.call(this);
-}
-MockSearchesProvider.prototype = {
-  __proto__: SearchesProvider.prototype,
-  measurementTypes: [MockSearchCountMeasurement],
-};
 
 function run_test() {
   run_next_test();
 }
 
 add_test(function test_constructor() {
   let provider = new SearchesProvider();
 
   run_next_test();
 });
 
 add_task(function test_record() {
   let storage = yield Metrics.Storage("record");
-  let provider = new MockSearchesProvider();
+  let provider = new SearchesProvider();
 
   yield provider.init(storage);
 
+  const ENGINES = [
+    "amazon.com",
+    "bing",
+    "google",
+    "yahoo",
+    "foobar",
+  ];
+
   let now = new Date();
 
-  for (let engine of DEFAULT_ENGINES) {
-    yield provider.recordSearch(engine.name, "abouthome");
-    yield provider.recordSearch(engine.name, "contextmenu");
-    yield provider.recordSearch(engine.name, "searchbar");
-    yield provider.recordSearch(engine.name, "urlbar");
+  for (let engine of ENGINES) {
+    yield provider.recordSearch(engine, "abouthome");
+    yield provider.recordSearch(engine, "contextmenu");
+    yield provider.recordSearch(engine, "searchbar");
+    yield provider.recordSearch(engine, "urlbar");
   }
 
   // Invalid sources should throw.
   let errored = false;
   try {
-    yield provider.recordSearch(DEFAULT_ENGINES[0].name, "bad source");
+    yield provider.recordSearch("google", "bad source");
   } catch (ex) {
     errored = true;
   } finally {
     do_check_true(errored);
   }
 
-  let m = provider.getMeasurement("counts", 2);
+  let m = provider.getMeasurement("counts", 1);
   let data = yield m.getValues();
   do_check_eq(data.days.size, 1);
   do_check_true(data.days.hasDay(now));
 
   let day = data.days.getDay(now);
-  for (let engine of DEFAULT_ENGINES) {
-    let identifier = engine.identifier;
-    if (identifier == "foobar") {
-      identifier = "other";
+  for (let engine of ENGINES) {
+    if (engine == "foobar") {
+      engine = "other";
     }
 
     for (let source of ["abouthome", "contextmenu", "searchbar", "urlbar"]) {
-      let field = identifier + "." + source;
+      let field = engine + "." + source;
       do_check_true(day.has(field));
       do_check_eq(day.get(field), 1);
     }
   }
 
   yield storage.close();
 });
 
-add_task(function test_includes_other_fields() {
-  let storage = yield Metrics.Storage("includes_other_fields");
-  let provider = new MockSearchesProvider();
-
-  yield provider.init(storage);
-  let m = provider.getMeasurement("counts", 2);
-
-  // Register a search against a provider that isn't live in this session.
-  let id = yield m.storage.registerField(m.id, "test.searchbar",
-                                         Metrics.Storage.FIELD_DAILY_COUNTER);
-
-  let testField = "test.searchbar";
-  let now = new Date();
-  yield m.storage.incrementDailyCounterFromFieldID(id, now);
-
-  // Make sure we don't know about it.
-  do_check_false(testField in m.fields);
-
-  // But we want to include it in payloads.
-  do_check_true(m.shouldIncludeField(testField));
-
-  // And we do so.
-  let data = yield provider.storage.getMeasurementValues(m.id);
-  let serializer = m.serializer(m.SERIALIZE_JSON);
-  let formatted = serializer.daily(data.days.getDay(now));
-  do_check_true(testField in formatted);
-  do_check_eq(formatted[testField], 1);
-
-  yield storage.close();
-});
--- a/services/metrics/dataprovider.jsm
+++ b/services/metrics/dataprovider.jsm
@@ -326,40 +326,22 @@ Measurement.prototype = Object.freeze({
   deleteLastNumeric: function (field) {
     return this.storage.deleteLastNumericFromFieldID(this.fieldID(field));
   },
 
   deleteLastText: function (field) {
     return this.storage.deleteLastTextFromFieldID(this.fieldID(field));
   },
 
-  /**
-   * This method is used by the default serializers to control whether a field
-   * is included in the output.
-   *
-   * There could be legacy fields in storage we no longer care about.
-   *
-   * This method is a hook to allow measurements to change this behavior, e.g.,
-   * to implement a dynamic fieldset.
-   *
-   * You will also need to override `fieldType`.
-   *
-   * @return (boolean) true if the specified field should be included in
-   *                   payload output.
-   */
-  shouldIncludeField: function (field) {
-    return field in this._fields;
-  },
-
   _serializeJSONSingular: function (data) {
     let result = {"_v": this.version};
 
     for (let [field, data] of data) {
       // There could be legacy fields in storage we no longer care about.
-      if (!this.shouldIncludeField(field)) {
+      if (!(field in this._fields)) {
         continue;
       }
 
       let type = this.fieldType(field);
 
       switch (type) {
         case this.storage.FIELD_LAST_NUMERIC:
         case this.storage.FIELD_LAST_TEXT:
@@ -380,17 +362,17 @@ Measurement.prototype = Object.freeze({
 
     return result;
   },
 
   _serializeJSONDay: function (data) {
     let result = {"_v": this.version};
 
     for (let [field, data] of data) {
-      if (!this.shouldIncludeField(field)) {
+      if (!(field in this._fields)) {
         continue;
       }
 
       let type = this.fieldType(field);
 
       switch (type) {
         case this.storage.FIELD_DAILY_COUNTER:
         case this.storage.FIELD_DAILY_DISCRETE_NUMERIC:
--- a/services/metrics/tests/xpcshell/test_metrics_provider.js
+++ b/services/metrics/tests/xpcshell/test_metrics_provider.js
@@ -280,26 +280,10 @@ add_task(function test_serialize_json_de
 
   do_check_eq(formatted["daily-last-numeric"], 4);
   do_check_eq(formatted["daily-last-text"], "apple");
 
   formatted = serializer.daily(data.days.getDay(yesterday));
   do_check_eq(formatted["daily-last-numeric"], 5);
   do_check_eq(formatted["daily-last-text"], "orange");
 
-  // Now let's turn off a field so that it's present in the DB
-  // but not present in the output.
-  let called = false;
-  let excluded = "daily-last-numeric";
-  Object.defineProperty(m, "shouldIncludeField", {
-    value: function fakeShouldIncludeField(field) {
-      called = true;
-      return field != excluded;
-    },
-  });
-
-  let limited = serializer.daily(data.days.getDay(yesterday));
-  do_check_true(called);
-  do_check_false(excluded in limited);
-  do_check_eq(formatted["daily-last-text"], "orange");
-
   yield provider.storage.close();
 });
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -1081,19 +1081,16 @@ function Engine(aLocation, aSourceDataTy
     ERROR("Engine location is neither a File nor a URI object",
           Cr.NS_ERROR_INVALID_ARG);
 }
 
 Engine.prototype = {
   // The engine's alias (can be null). Initialized to |undefined| to indicate
   // not-initialized-from-engineMetadataService.
   _alias: undefined,
-  // A distribution-unique identifier for the engine. Either null or set
-  // when loaded. See getter.
-  _identifier: undefined,
   // The data describing the engine. Is either an array of bytes, for Sherlock
   // files, or an XML document element, for XML plugins.
   _data: null,
   // The engine's data type. See data types (DATA_) defined above.
   _dataType: null,
   // Whether or not the engine is readonly.
   _readOnly: true,
   // The engine's description
@@ -2278,48 +2275,16 @@ Engine.prototype = {
     return this._alias;
   },
   set alias(val) {
     this._alias = val;
     engineMetadataService.setAttr(this, "alias", val);
     notifyAction(this, SEARCH_ENGINE_CHANGED);
   },
 
-  /**
-   * Return the built-in identifier of app-provided engines.
-   *
-   * Note that this identifier is substantially similar to _id, with the
-   * following exceptions:
-   *
-   * * There is no trailing file extension.
-   * * There is no [app] prefix.
-   *
-   * @return a string identifier, or null.
-   */
-  get identifier() {
-    if (this._identifier !== undefined) {
-      return this._identifier;
-    }
-
-    // No identifier if If the engine isn't app-provided
-    if (!this._isInAppDir && !this._isInJAR) {
-      return this._identifier = null;
-    }
-
-    let leaf = this._getLeafName();
-    ENSURE_WARN(leaf, "identifier: app-provided engine has no leafName");
-
-    // Strip file extension.
-    let ext = leaf.lastIndexOf(".");
-    if (ext == -1) {
-      return this._identifier = leaf;
-    }
-    return this._identifier = leaf.substring(0, ext);
-  },
-
   get description() {
     return this._description;
   },
 
   get hidden() {
     if (this._hidden === null)
       this._hidden = engineMetadataService.getAttr(this, "hidden") || false;
     return this._hidden;
@@ -2353,69 +2318,55 @@ Engine.prototype = {
       return this._file.path;
 
     if (this._uri)
       return this._uri.spec;
 
     return "";
   },
 
-  /**
-   * @return the leaf name of the filename or URI of this plugin,
-   *         or null if no file or URI is known.
-   */
-  _getLeafName: function () {
-    if (this._file) {
-      return this._file.leafName;
-    }
-    if (this._uri && this._uri instanceof Ci.nsIURL) {
-      return this._uri.fileName;
-    }
-    return null;
-  },
-    
   // The file that the plugin is loaded from is a unique identifier for it.  We
   // use this as the identifier to store data in the sqlite database
   __id: null,
   get _id() {
-    if (this.__id) {
+    if (this.__id)
       return this.__id;
-    }
-
-    let leafName = this._getLeafName();
 
     // Treat engines loaded from JARs the same way we treat app shipped
     // engines.
     // Theoretically, these could also come from extensions, but there's no
     // real way for extensions to register their chrome locations at the
     // moment, so let's not deal with that case.
     // This means we're vulnerable to conflicts if a file loaded from a JAR
     // has the same filename as a file loaded from the app dir, but with a
     // different engine name. People using the JAR functionality should be
     // careful not to do that!
     if (this._isInAppDir || this._isInJAR) {
-      // App dir and JAR engines should always have leafNames
-      ENSURE_WARN(leafName, "_id: no leafName for appDir or JAR engine",
-                  Cr.NS_ERROR_UNEXPECTED);
+      let leafName;
+      if (this._file)
+        leafName = this._file.leafName;
+      else {
+        // If we've reached this point, we must be loaded from a JAR, which
+        // also means we should have a URL.
+        ENSURE_WARN(this._isInJAR && (this._uri instanceof Ci.nsIURL),
+                    "_id: not inJAR, or no URI", Cr.NS_ERROR_UNEXPECTED);
+        leafName = this._uri.fileName;
+      }
+
       return this.__id = "[app]/" + leafName;
     }
 
-    if (this._isInProfile) {
-      ENSURE_WARN(leafName, "_id: no leafName for profile engine",
-                  Cr.NS_ERROR_UNEXPECTED);
-      return this.__id = "[profile]/" + leafName;
-    }
-
-    // If the engine isn't a JAR engine, it should have a file.
-    ENSURE_WARN(this._file, "_id: no _file for non-JAR engine",
-                Cr.NS_ERROR_UNEXPECTED);
+    ENSURE_WARN(this._file, "_id: no _file!", Cr.NS_ERROR_UNEXPECTED);
+
+    if (this._isInProfile)
+      return this.__id = "[profile]/" + this._file.leafName;
 
     // We're not in the profile or appdir, so this must be an extension-shipped
     // plugin. Use the full filename.
-    return this.__id = this._file.path;
+    return this.__id  = this._file.path;
   },
 
   get _installLocation() {
     if (this.__installLocation === null) {
       if (!this._file) {
         ENSURE_WARN(this._uri, "Engines without files must have URIs",
                     Cr.NS_ERROR_UNEXPECTED);
         this.__installLocation = SEARCH_JAR;
deleted file mode 100644
--- a/toolkit/components/search/tests/xpcshell/test_identifiers.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- *    http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Test that a search engine's identifier can be extracted from the filename.
- */
-
-"use strict";
-
-const Ci = Components.interfaces;
-const SEARCH_APP_DIR = 1;
-
-function run_test() {
-  removeMetadata();
-  removeCacheFile();
-  do_load_manifest("data/chrome.manifest");
-
-  let url  = "chrome://testsearchplugin/locale/searchplugins/";
-  Services.prefs.setCharPref("browser.search.jarURIs", url);
-  Services.prefs.setBoolPref("browser.search.loadFromJars", true);
-
-  updateAppInfo();
-
-  run_next_test();
-}
-
-add_test(function test_identifier() {
-  let engineFile = gProfD.clone();
-  engineFile.append("searchplugins");
-  engineFile.append("test-search-engine.xml");
-  engineFile.parent.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
-
-  // Copy the test engine to the test profile.
-  let engineTemplateFile = do_get_file("data/engine.xml");
-  engineTemplateFile.copyTo(engineFile.parent, "test-search-engine.xml");
-
-  let search = Services.search.init(function initComplete(aResult) {
-    do_print("init'd search service");
-    do_check_true(Components.isSuccessCode(aResult));
-
-    let profileEngine = Services.search.getEngineByName("Test search engine");
-    let jarEngine = Services.search.getEngineByName("bug645970");
-
-    do_check_true(profileEngine instanceof Ci.nsISearchEngine);
-    do_check_true(jarEngine instanceof Ci.nsISearchEngine);
-
-    // An engine loaded from the profile directory won't have an identifier,
-    // because it's not built-in.
-    do_check_eq(profileEngine.identifier, null);
-
-    // An engine loaded from a JAR will have an identifier corresponding to
-    // the filename inside the JAR. (In this case it's the same as the name.)
-    do_check_eq(jarEngine.identifier, "bug645970");
-
-    removeMetadata();
-    removeCacheFile();
-    run_next_test();
-  });
-});
-
--- a/toolkit/components/search/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/search/tests/xpcshell/xpcshell.ini
@@ -1,15 +1,14 @@
 [DEFAULT]
 head = head_search.js
 tail = 
 firefox-appdir = browser
 
 [test_645970.js]
-[test_identifiers.js]
 [test_init_async_multiple.js]
 [test_init_async_multiple_then_sync.js]
 [test_json_cache.js]
 [test_migratedb.js]
 [test_nodb.js]
 [test_nodb_pluschanges.js]
 [test_purpose.js]