Backed out 5 changesets (bug 1287091) for build bustage after assertions in SharedIC.h CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 22 Jul 2016 11:14:13 -0700
changeset 346420 820961ff0369ddab74419085c64fac957d1be0b3
parent 346419 492da4127b841cfe2bebdde841c350e6f009c763
child 346421 400da2ae93a1cad8ce9c6ce8bd329b290b453fc8
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1287091
milestone50.0a1
backs outc57fd3af416e73fbfabcd6e7e985feedf6979504
edad0174cb120f85438a533e8da67af96c29e96d
7ed07b35bad6e2b5571f24213787ab08237d88cc
939d5064ab91410a763fd3a285a55038f0f36ebc
acbca9af0a3b2c14bbaa20d7d44bd197b3a03e50
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
Backed out 5 changesets (bug 1287091) for build bustage after assertions in SharedIC.h CLOSED TREE Backed out changeset c57fd3af416e (bug 1287091) Backed out changeset edad0174cb12 (bug 1287091) Backed out changeset 7ed07b35bad6 (bug 1287091) Backed out changeset 939d5064ab91 (bug 1287091) Backed out changeset acbca9af0a3b (bug 1287091)
browser/base/content/browser.js
browser/base/content/nsContextMenu.js
browser/base/content/utilityOverlay.js
browser/components/customizableui/CustomizableWidgets.jsm
toolkit/components/contextualidentity/ContextualIdentityService.jsm
toolkit/components/contextualidentity/moz.build
toolkit/components/contextualidentity/tests/unit/test_basic.js
toolkit/components/contextualidentity/tests/unit/xpcshell.ini
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3,17 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 var Cc = Components.classes;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/ContextualIdentityService.jsm");
 Cu.import("resource://gre/modules/NotificationDB.jsm");
 Cu.import("resource:///modules/RecentWindow.jsm");
 
 
 XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
                                   "resource://gre/modules/Preferences.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
                                   "resource://gre/modules/Deprecated.jsm");
@@ -52,16 +51,18 @@ XPCOMUtils.defineLazyServiceGetter(this,
                                    "mozIAsyncFavicons");
 XPCOMUtils.defineLazyServiceGetter(this, "gDNSService",
                                    "@mozilla.org/network/dns-service;1",
                                    "nsIDNSService");
 XPCOMUtils.defineLazyServiceGetter(this, "WindowsUIUtils",
                                    "@mozilla.org/windows-ui-utils;1", "nsIWindowsUIUtils");
 XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
                                   "resource://gre/modules/LightweightThemeManager.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
+                                  "resource://gre/modules/ContextualIdentityService.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "gAboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
   return Services.strings.createBundle('chrome://browser/locale/browser.properties');
 });
 XPCOMUtils.defineLazyModuleGetter(this, "AddonWatcher",
                                   "resource://gre/modules/AddonWatcher.jsm");
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1,22 +1,23 @@
 /* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ts=2 sw=2 sts=2 et tw=80: */
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
 Components.utils.import("resource://gre/modules/LoginManagerContextMenu.jsm");
 Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
+XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
+                                  "resource://gre/modules/ContextualIdentityService.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
   "resource://gre/modules/LoginHelper.jsm");
 
 var gContextMenuContentData = null;
 
 function nsContextMenu(aXulMenu, aIsShift) {
   this.shouldDisplay = true;
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -1,24 +1,26 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Services = object with smart getters for common XPCOM services
 Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/ContextualIdentityService.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 Components.utils.import("resource:///modules/RecentWindow.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ShellService",
                                   "resource:///modules/ShellService.jsm");
 
+XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
+                                  "resource://gre/modules/ContextualIdentityService.jsm");
+
 XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 
 this.__defineGetter__("BROWSER_NEW_TAB_URL", () => {
   if (PrivateBrowsingUtils.isWindowPrivate(window) &&
       !PrivateBrowsingUtils.permanentPrivateBrowsing &&
       !aboutNewTabService.overridden) {
@@ -440,22 +442,18 @@ function createUserContextMenu(event, ad
 
   ContextualIdentityService.getIdentities().forEach(identity => {
     if (identity.userContextId == excludeUserContextId) {
       return;
     }
 
     let menuitem = document.createElement("menuitem");
     menuitem.setAttribute("usercontextid", identity.userContextId);
-    menuitem.setAttribute("label", ContextualIdentityService.getUserContextLabel(identity.userContextId));
-
-    if (identity.accessKey) {
-      menuitem.setAttribute("accesskey", bundle.getString(identity.accessKey));
-    }
-
+    menuitem.setAttribute("label", bundle.getString(identity.label));
+    menuitem.setAttribute("accesskey", bundle.getString(identity.accessKey));
     menuitem.classList.add("menuitem-iconic");
 
     if (addCommandAttribute) {
       menuitem.setAttribute("command", "Browser:NewUserContextTab");
     }
 
     menuitem.setAttribute("image", identity.icon);
 
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -6,33 +6,34 @@
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 this.EXPORTED_SYMBOLS = ["CustomizableWidgets"];
 
 Cu.import("resource:///modules/CustomizableUI.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/AppConstants.jsm");
-Cu.import("resource://gre/modules/ContextualIdentityService.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "BrowserUITelemetry",
   "resource:///modules/BrowserUITelemetry.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
   "resource://gre/modules/PlacesUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUIUtils",
   "resource:///modules/PlacesUIUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "RecentlyClosedTabsAndWindowsMenuUtils",
   "resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ShortcutUtils",
   "resource://gre/modules/ShortcutUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "CharsetMenu",
   "resource://gre/modules/CharsetMenu.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "SyncedTabs",
   "resource://services-sync/SyncedTabs.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
+  "resource://gre/modules/ContextualIdentityService.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() {
   const kCharsetBundle = "chrome://global/locale/charsetMenu.properties";
   return Services.strings.createBundle(kCharsetBundle);
 });
 XPCOMUtils.defineLazyGetter(this, "BrandBundle", function() {
   const kBrandBundle = "chrome://branding/locale/brand.properties";
   return Services.strings.createBundle(kBrandBundle);
@@ -1129,17 +1130,17 @@ const CustomizableWidgets = [
       while (items.firstChild) {
         items.firstChild.remove();
       }
 
       let fragment = doc.createDocumentFragment();
 
       ContextualIdentityService.getIdentities().forEach(identity => {
         let bundle = doc.getElementById("bundle_browser");
-        let label = ContextualIdentityService.getUserContextLabel(identity.userContextId);
+        let label = bundle.getString(identity.label);
 
         let item = doc.createElementNS(kNSXUL, "toolbarbutton");
         item.setAttribute("label", label);
         item.setAttribute("usercontextid", identity.userContextId);
         item.setAttribute("class", "subviewbutton");
         item.setAttribute("image", identity.icon);
 
         fragment.appendChild(item);
--- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm
@@ -2,270 +2,89 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["ContextualIdentityService"];
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/Services.jsm")
 
-const DEFAULT_TAB_COLOR = "#909090";
-const SAVE_DELAY_MS = 1500;
+const DEFAULT_TAB_COLOR = "#909090"
 
 XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
   return Services.strings.createBundle("chrome://browser/locale/browser.properties");
 });
 
-XPCOMUtils.defineLazyGetter(this, "gTextDecoder", function () {
-  return new TextDecoder();
-});
-
-XPCOMUtils.defineLazyGetter(this, "gTextEncoder", function () {
-  return new TextEncoder();
-});
-
-XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown",
-                                  "resource://gre/modules/AsyncShutdown.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
-                                  "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask",
-                                  "resource://gre/modules/DeferredTask.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
-                                  "resource://gre/modules/FileUtils.jsm");
-
-function _ContextualIdentityService(path) {
-  this.init(path);
-}
-
-_ContextualIdentityService.prototype = {
-  _defaultIdentities: [
+this.ContextualIdentityService = {
+  _identities: [
     { userContextId: 1,
       public: true,
       icon: "chrome://browser/skin/usercontext/personal.svg",
       color: "#00a7e0",
-      l10nID: "userContextPersonal.label",
+      label: "userContextPersonal.label",
       accessKey: "userContextPersonal.accesskey",
+      alreadyOpened: false,
       telemetryId: 1,
     },
     { userContextId: 2,
       public: true,
       icon: "chrome://browser/skin/usercontext/work.svg",
       color: "#f89c24",
-      l10nID: "userContextWork.label",
+      label: "userContextWork.label",
       accessKey: "userContextWork.accesskey",
+      alreadyOpened: false,
       telemetryId: 2,
     },
     { userContextId: 3,
       public: true,
       icon: "chrome://browser/skin/usercontext/banking.svg",
       color: "#7dc14c",
-      l10nID: "userContextBanking.label",
+      label: "userContextBanking.label",
       accessKey: "userContextBanking.accesskey",
+      alreadyOpened: false,
       telemetryId: 3,
     },
     { userContextId: 4,
       public: true,
       icon: "chrome://browser/skin/usercontext/shopping.svg",
       color: "#ee5195",
-      l10nID: "userContextShopping.label",
+      label: "userContextShopping.label",
       accessKey: "userContextShopping.accesskey",
+      alreadyOpened: false,
       telemetryId: 4,
     },
-    { userContextId: 5,
+    { userContextId: Math.pow(2, 31) - 1,
       public: false,
       icon: "",
       color: "",
-      name: "userContextIdInternal.thumbnail",
-      accessKey: "" },
+      label: "userContextIdInternal.thumbnail",
+      accessKey: "",
+      alreadyOpened: false },
   ],
 
-  _identities: null,
-  _openedIdentities: new Set(),
-  _lastUserContextId: 0,
-
-  _path: null,
-  _dataReady: false,
-
-  _saver: null,
-
-  init(path) {
-    this._path = path;
-    this._saver = new DeferredTask(() => this.save(), SAVE_DELAY_MS);
-    AsyncShutdown.profileBeforeChange.addBlocker("ContextualIdentityService: writing data",
-                                                 () => this._saver.finalize());
-
-    this.load();
-  },
-
-  load() {
-    OS.File.read(this._path).then(bytes => {
-      // If synchronous loading happened in the meantime, exit now.
-      if (this._dataReady) {
-        return;
-      }
-
-      try {
-        let data = JSON.parse(gTextDecoder.decode(bytes));
-        if (data.version != 1) {
-          dump("ERROR - ContextualIdentityService - Unknown version found in " + this._path + "\n");
-          this.loadError(null);
-          return;
-        }
-
-        this._identities = data.identities;
-        this._lastUserContextId = data.lastUserContextId;
-
-        this._dataReady = true;
-      } catch(error) {
-        this.loadError(error);
-      }
-    }, (error) => {
-      this.loadError(error);
-    });
-  },
-
-  loadError(error) {
-    if (error != null &&
-        !(error instanceof OS.File.Error && error.becauseNoSuchFile) &&
-        !(error instanceof Components.Exception &&
-          error.result == Cr.NS_ERROR_FILE_NOT_FOUND)) {
-      // Let's report the error.
-      Cu.reportError(error);
-    }
-
-    // If synchronous loading happened in the meantime, exit now.
-    if (this._dataReady) {
-      return;
-    }
-
-    this._identities = this._defaultIdentities;
-    this._lastUserContextId = this._defaultIdentities.length;
-
-    this._dataReady = true;
-
-    this.saveSoon();
-  },
-
-  saveSoon() {
-    this._saver.arm();
+  getIdentities() {
+    return this._identities.filter(info => info.public);
   },
 
-  save() {
-   let object = {
-     version: 1,
-     lastUserContextId: this._lastUserContextId,
-     identities: this._identities
-   };
-
-   let bytes = gTextEncoder.encode(JSON.stringify(object));
-   return OS.File.writeAtomic(this._path, bytes,
-                              { tmpPath: this._path + ".tmp" });
-  },
-
-  create(name, icon, color) {
-    let identity = {
-      userContextId: ++this._lastUserContextId,
-      public: true,
-      icon,
-      color,
-      name
-    };
-
-    this._identities.push(identity);
-    this.saveSoon();
-
-    return Cu.cloneInto(identity, {});
-  },
-
-  update(userContextId, name, icon, color) {
-    let identity = this._identities.find(identity => identity.userContextId == userContextId &&
-                                         identity.public);
-    if (identity) {
-      identity.name = name;
-      identity.color = color;
-      identity.icon = icon;
-      delete identity.l10nID;
-      delete identity.accessKey;
-      this.saveSoon();
-    }
-
-    return !!identity;
-  },
-
-  remove(userContextId) {
-    let index = this._identities.findIndex(i => i.userContextId == userContextId && i.public);
-    if (index == -1) {
-      return false;
-    }
-
-    Services.obs.notifyObservers(null, "clear-origin-data",
-                                 JSON.stringify({ userContextId }));
-
-    this._identities.splice(index, 1);
-    this._openedIdentities.delete(userContextId);
-    this.saveSoon();
-
-    return true;
-  },
-
-  ensureDataReady() {
-    if (this._dataReady) {
-      return;
-    }
-
-    try {
-      // This reads the file and automatically detects the UTF-8 encoding.
-      let inputStream = Cc["@mozilla.org/network/file-input-stream;1"]
-                          .createInstance(Ci.nsIFileInputStream);
-      inputStream.init(new FileUtils.File(this._path),
-                       FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
-      try {
-        let json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
-        this._identities = json.decodeFromStream(inputStream,
-                                                 inputStream.available());
-        this._dataReady = true;
-      } finally {
-        inputStream.close();
-      }
-    } catch (error) {
-      this.loadError(error);
-      return;
-    }
-  },
-
-  getIdentities() {
-    this.ensureDataReady();
-    return Cu.cloneInto(this._identities.filter(info => info.public), {});
-  },
-
-  getPrivateIdentity(name) {
-    this.ensureDataReady();
-    return Cu.cloneInto(this._identities.find(info => !info.public && info.name == name), {});
+  getPrivateIdentity(label) {
+    return this._identities.find(info => !info.public && info.label == label);
   },
 
   getIdentityFromId(userContextId) {
-    this.ensureDataReady();
-    return Cu.cloneInto(this._identities.find(info => info.userContextId == userContextId &&
-                                              info.public), {});
+    return this._identities.find(info => info.userContextId == userContextId);
   },
 
   getUserContextLabel(userContextId) {
     let identity = this.getIdentityFromId(userContextId);
     if (!identity.public) {
       return "";
     }
-
-    // We cannot localize the user-created identity names.
-    if (identity.name) {
-      return identity.name;
-    }
-
-    return gBrowserBundle.GetStringFromName(identity.l10nID);
+    return gBrowserBundle.GetStringFromName(identity.label);
   },
 
   setTabStyle(tab) {
     // inline style is only a temporary fix for some bad performances related
     // to the use of CSS vars. This code will be removed in bug 1278177.
     if (!tab.hasAttribute("usercontextid")) {
       tab.style.removeProperty("background-image");
       tab.style.removeProperty("background-size");
@@ -285,28 +104,21 @@ function _ContextualIdentityService(path
   telemetry(userContextId) {
     let identity = this.getIdentityFromId(userContextId);
 
     // Let's ignore unknown identities for now.
     if (!identity || !identity.public) {
       return;
     }
 
-    if (this._openedIdentities.has(userContextId)) {
-      this._openedIdentities.add(userContextId);
+    if (!identity.alreadyOpened) {
+      identity.alreadyOpened = true;
       Services.telemetry.getHistogramById("UNIQUE_CONTAINERS_OPENED").add(1);
     }
 
     Services.telemetry.getHistogramById("TOTAL_CONTAINERS_OPENED").add(1);
 
     if (identity.telemetryId) {
       Services.telemetry.getHistogramById("CONTAINER_USED")
                         .add(identity.telemetryId);
     }
   },
-
-  createNewInstanceForTesting(path) {
-    return new _ContextualIdentityService(path);
-  },
-};
-
-let path = OS.Path.join(OS.Constants.Path.profileDir, "containers.json");
-this.ContextualIdentityService = new _ContextualIdentityService(path);
+}
--- a/toolkit/components/contextualidentity/moz.build
+++ b/toolkit/components/contextualidentity/moz.build
@@ -2,10 +2,8 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXTRA_JS_MODULES += [
     'ContextualIdentityService.jsm',
 ]
-
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
deleted file mode 100644
--- a/toolkit/components/contextualidentity/tests/unit/test_basic.js
+++ /dev/null
@@ -1,67 +0,0 @@
-"use strict";
-
-do_get_profile();
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/ContextualIdentityService.jsm");
-
-const TEST_STORE_FILE_NAME = "test-containers.json";
-
-let cis;
-
-// Basic tests
-add_task(function() {
-  ok(!!ContextualIdentityService, "ContextualIdentityService exists");
-
-  cis = ContextualIdentityService.createNewInstanceForTesting(TEST_STORE_FILE_NAME);
-  ok(!!cis, "We have our instance of ContextualIdentityService");
-
-  equal(cis.getIdentities().length, 4, "By default, 4 containers.");
-  equal(cis.getIdentityFromId(0), null, "No identity with id 0");
-
-  ok(!!cis.getIdentityFromId(1), "Identity 1 exists");
-  ok(!!cis.getIdentityFromId(2), "Identity 2 exists");
-  ok(!!cis.getIdentityFromId(3), "Identity 3 exists");
-  ok(!!cis.getIdentityFromId(4), "Identity 4 exists");
-});
-
-// Create a new identity
-add_task(function() {
-  equal(cis.getIdentities().length, 4, "By default, 4 containers.");
-
-  let identity = cis.create("New Container", "Icon", "Color");
-  ok(!!identity, "New container created");
-  equal(identity.name, "New Container", "Name matches");
-  equal(identity.icon, "Icon", "Icon matches");
-  equal(identity.color, "Color", "Color matches");
-
-  equal(cis.getIdentities().length, 5, "Expected 5 containers.");
-
-  ok(!!cis.getIdentityFromId(identity.userContextId), "Identity exists");
-  equal(cis.getIdentityFromId(identity.userContextId).name, "New Container", "Identity name is OK");
-  equal(cis.getIdentityFromId(identity.userContextId).icon, "Icon", "Identity icon is OK");
-  equal(cis.getIdentityFromId(identity.userContextId).color, "Color", "Identity color is OK");
-  equal(cis.getUserContextLabel(identity.userContextId), "New Container", "Identity label is OK");
-
-  // Remove an identity
-  equal(cis.remove(-1), false, "cis.remove() returns false if identity doesn't exist.");
-  equal(cis.remove(1), true, "cis.remove() returns true if identity exists.");
-
-  equal(cis.getIdentities().length, 4, "Expected 4 containers.");
-});
-
-// Update an identity
-add_task(function() {
-  ok(!!cis.getIdentityFromId(2), "Identity 2 exists");
-
-  equal(cis.update(-1, "Container", "Icon", "Color"), false, "Update returns false if the identity doesn't exist");
-
-  equal(cis.update(2, "Container", "Icon", "Color"), true, "Update returns true if everything is OK");
-
-  ok(!!cis.getIdentityFromId(2), "Identity exists");
-  equal(cis.getIdentityFromId(2).name, "Container", "Identity name is OK");
-  equal(cis.getIdentityFromId(2).icon, "Icon", "Identity icon is OK");
-  equal(cis.getIdentityFromId(2).color, "Color", "Identity color is OK");
-  equal(cis.getUserContextLabel(2), "Container", "Identity label is OK");
-});
deleted file mode 100644
--- a/toolkit/components/contextualidentity/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_basic.js]