Backed out changeset 1b13b329ba29 (bug 1444414) for devtools failures on browser_storage_localstorage_rapid_add_remove.js timeouts a=backout CLOSED TREE
authorNoemi Erli <nerli@mozilla.com>
Tue, 13 Mar 2018 03:59:03 +0200
changeset 766597 6ff60a083701d08c52702daf50f28e8f46ae3a1c
parent 766553 1b13b329ba29146401713da36a545b6ed6bebfe9
child 766598 afa9f456e7e49072aba5ecd3f33a028bf417972d
child 766599 33e59c5e8a86364ab0f3494ad12d756465cb82db
child 766600 71ed126a0f2cc301dc8ed1478a6e91b19dc7603b
child 766603 66f74d4172588faeaa87ae48a363222d2ec76910
child 766625 0c649d8ac575c2dead182639f4cac12c720ba218
child 766636 c1704f951e9217dbd81b242001ae0e7390afc14a
child 766664 8c2e736f126e871e127d09183c7ea64ee34f8e2a
child 766665 32959d20f06058ca2695c62161d04ffebcc0876e
child 766672 3e60aeb17f19c7f62c72db721e380598e02f9f09
child 766744 734d58b8583216da67417922211cc9d6359e0e79
child 766747 e32a8157cf60185a7a854beffb2ffab973581c60
child 766749 1b0807f27f965487d1bc23b4a83f606e76028567
child 766754 3629630035b2423da2dac121637d786fd47f6504
child 766755 e054f3ae43515d2084b378c0029dc57873a8a570
child 766757 ef3530d22d3120d5e58cc9cb7adb26a672490b80
child 766815 a97e078dcacb77ff36172850d247025e48caf051
child 766832 d6ff84d4293d3452b2c8f5e6b2897b46817349eb
child 766834 01cf0beb37090dd2eebd94dbe251b5af02e1f82f
child 766843 f46a5d07584140edbe2610a31db1fa358217a739
child 766888 b2f49b9022002499dc7b9361912249a042c30c9b
child 767927 ecb8c1ee519d08b529cc4b5122a658fdad3ef146
child 768549 90390afd294cb7254ff3c8249fa84a43ad6a517d
child 769143 b792dfeb259d3f11d65e49bb3d112f32c91789f4
child 769152 1cfe2fec9a626c87c40307e23b99d1f839204f65
child 772699 95d7dc2797dbebdfc20c3bf304571da8bdea2d35
child 776814 dd2f62c1f459cb7e031c593bacbaeb4c6397c461
push id102367
push userfelipc@gmail.com
push dateTue, 13 Mar 2018 04:43:22 +0000
reviewersbackout
bugs1444414
milestone61.0a1
backs out1b13b329ba29146401713da36a545b6ed6bebfe9
Backed out changeset 1b13b329ba29 (bug 1444414) for devtools failures on browser_storage_localstorage_rapid_add_remove.js timeouts a=backout CLOSED TREE
devtools/client/shared/widgets/TreeWidget.js
devtools/client/storage/test/browser_storage_cookies_delete_all.js
devtools/client/storage/test/browser_storage_delete.js
devtools/client/storage/test/browser_storage_delete_tree.js
devtools/client/storage/test/browser_storage_delete_usercontextid.js
devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js
devtools/client/storage/test/browser_storage_dynamic_updates_localStorage.js
devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js
devtools/client/storage/test/browser_storage_indexeddb_delete.js
devtools/client/storage/test/browser_storage_indexeddb_delete_blocked.js
devtools/client/storage/test/head.js
devtools/client/storage/ui.js
--- a/devtools/client/shared/widgets/TreeWidget.js
+++ b/devtools/client/shared/widgets/TreeWidget.js
@@ -268,16 +268,35 @@ TreeWidget.prototype = {
         ), items[i].attachment);
       }
     }
     // Empty the empty-tree-text
     this.setPlaceholderText("");
   },
 
   /**
+   * Check if an item exists.
+   *
+   * @param {array} item
+   *        The array of ids leading up to the item.
+   */
+  exists: function (item) {
+    let bookmark = this.root;
+
+    for (let id of item) {
+      if (bookmark.items.has(id)) {
+        bookmark = bookmark.items.get(id);
+      } else {
+        return false;
+      }
+    }
+    return true;
+  },
+
+  /**
    * Removes the specified item and all of its child items from the tree.
    *
    * @param {array} item
    *        The array of ids leading up to the item.
    */
   remove: function (item) {
     this.root.remove(item);
     this.attachments.delete(JSON.stringify(item));
--- a/devtools/client/storage/test/browser_storage_cookies_delete_all.js
+++ b/devtools/client/storage/test/browser_storage_cookies_delete_all.js
@@ -17,17 +17,17 @@ function* performDelete(store, rowName, 
     "#storage-table-popup-delete-all-session-cookies");
   let menuDeleteAllFromItem = contextMenu.querySelector(
     "#storage-table-popup-delete-all-from");
 
   let storeName = store.join(" > ");
 
   yield selectTreeItem(store);
 
-  let eventWait = gUI.once("store-objects-updated");
+  let eventWait = gUI.once("store-objects-edit");
   let cells = getRowCells(rowName, true);
 
   yield waitForContextMenu(contextMenu, cells.name, () => {
     info(`Opened context menu in ${storeName}, row '${rowName}'`);
     switch (action) {
       case "deleteAll":
         menuDeleteAllItem.click();
         break;
--- a/devtools/client/storage/test/browser_storage_delete.js
+++ b/devtools/client/storage/test/browser_storage_delete.js
@@ -33,17 +33,17 @@ add_task(function* () {
     let treeItemName = treeItem.join(" > ");
 
     info(`Selecting tree item ${treeItemName}`);
     yield selectTreeItem(treeItem);
 
     let row = getRowCells(rowName);
     ok(gUI.table.items.has(rowName), `There is a row '${rowName}' in ${treeItemName}`);
 
-    let eventWait = gUI.once("store-objects-updated");
+    let eventWait = gUI.once("store-objects-edit");
 
     yield waitForContextMenu(contextMenu, row[cellToClick], () => {
       info(`Opened context menu in ${treeItemName}, row '${rowName}'`);
       menuDeleteItem.click();
       let truncatedRowName = String(rowName).replace(SEPARATOR_GUID, "-").substr(0, 16);
       ok(menuDeleteItem.getAttribute("label").includes(truncatedRowName),
         `Context menu item label contains '${rowName}' (maybe truncated)`);
     });
--- a/devtools/client/storage/test/browser_storage_delete_tree.js
+++ b/devtools/client/storage/test/browser_storage_delete_tree.js
@@ -45,17 +45,17 @@ add_task(function* () {
   ];
 
   for (let store of deleteHosts) {
     let storeName = store.join(" > ");
 
     yield selectTreeItem(store);
 
     let eventName = "store-objects-" +
-      (store[0] == "cookies" ? "updated" : "cleared");
+      (store[0] == "cookies" ? "edit" : "cleared");
     let eventWait = gUI.once(eventName);
 
     let selector = `[data-id='${JSON.stringify(store)}'] > .tree-widget-item`;
     let target = gPanelWindow.document.querySelector(selector);
     ok(target, `tree item found in ${storeName}`);
     yield waitForContextMenu(contextMenu, target, () => {
       info(`Opened tree context menu in ${storeName}`);
       menuDeleteAllItem.click();
--- a/devtools/client/storage/test/browser_storage_delete_usercontextid.js
+++ b/devtools/client/storage/test/browser_storage_delete_usercontextid.js
@@ -149,17 +149,17 @@ add_task(function* () {
     let treeItemName = treeItem.join(" > ");
 
     info(`Selecting tree item ${treeItemName}`);
     yield selectTreeItem(treeItem);
 
     let row = getRowCells(rowName);
     ok(gUI.table.items.has(rowName), `There is a row '${rowName}' in ${treeItemName}`);
 
-    let eventWait = gUI.once("store-objects-updated");
+    let eventWait = gUI.once("store-objects-edit");
 
     yield waitForContextMenu(contextMenu, row[cellToClick], () => {
       info(`Opened context menu in ${treeItemName}, row '${rowName}'`);
       menuDeleteItem.click();
       let truncatedRowName = String(rowName).replace(SEPARATOR_GUID, "-").substr(0, 16);
       ok(menuDeleteItem.getAttribute("label").includes(truncatedRowName),
         `Context menu item label contains '${rowName}' (maybe truncated)`);
     });
--- a/devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js
+++ b/devtools/client/storage/test/browser_storage_dynamic_updates_cookies.js
@@ -47,38 +47,37 @@ add_task(function* () {
       [
         getCookieId("c1", "test1.example.org", "/browser"),
         getCookieId("c2", "test1.example.org", "/browser")
       ]
     ],
   ]);
   checkCell(c1id, "value", "1.2.3.4.5.6.7");
 
-  gWindow.addCookie("c1", '{"foo": 4,"bar":6}', "/browser");
-  yield gUI.once("sidebar-updated");
-  yield gUI.once("store-objects-updated");
+  yield addCookie("c1", '{"foo": 4,"bar":6}', "/browser");
+  yield gUI.once("store-objects-edit");
 
   yield findVariableViewProperties(finalValue[0], false);
   yield findVariableViewProperties(finalValue[1], true);
 
   yield checkState([
     [
       ["cookies", "http://test1.example.org"],
       [
         getCookieId("c1", "test1.example.org", "/browser"),
         getCookieId("c2", "test1.example.org", "/browser")
       ]
     ],
   ]);
   checkCell(c1id, "value", '{"foo": 4,"bar":6}');
 
   // Add a new entry
-  gWindow.addCookie("c3", "booyeah");
+  yield addCookie("c3", "booyeah");
 
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["cookies", "http://test1.example.org"],
       [
         getCookieId("c1", "test1.example.org", "/browser"),
         getCookieId("c2", "test1.example.org", "/browser"),
         getCookieId("c3", "test1.example.org",
@@ -86,21 +85,19 @@ add_task(function* () {
       ]
     ],
   ]);
   let c3id = getCookieId("c3", "test1.example.org",
                          "/browser/devtools/client/storage/test/");
   checkCell(c3id, "value", "booyeah");
 
   // Add another
-  gWindow.addCookie("c4", "booyeah");
+  yield addCookie("c4", "booyeah");
 
-  // Wait once for update and another time for value fetching
-  yield gUI.once("store-objects-updated");
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["cookies", "http://test1.example.org"],
       [
         getCookieId("c1", "test1.example.org", "/browser"),
         getCookieId("c2", "test1.example.org", "/browser"),
         getCookieId("c3", "test1.example.org",
@@ -110,20 +107,19 @@ add_task(function* () {
       ]
     ],
   ]);
   let c4id = getCookieId("c4", "test1.example.org",
                          "/browser/devtools/client/storage/test/");
   checkCell(c4id, "value", "booyeah");
 
   // Removing cookies
-  gWindow.removeCookie("c1", "/browser");
+  yield removeCookie("c1", "/browser");
 
-  yield gUI.once("sidebar-updated");
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["cookies", "http://test1.example.org"],
       [
         getCookieId("c2", "test1.example.org", "/browser"),
         getCookieId("c3", "test1.example.org",
                     "/browser/devtools/client/storage/test/"),
@@ -134,56 +130,71 @@ add_task(function* () {
   ]);
 
   ok(!gUI.sidebar.hidden, "Sidebar still visible for next row");
 
   // Check if next element's value is visible in sidebar
   yield findVariableViewProperties([{name: "c2", value: "foobar"}]);
 
   // Keep deleting till no rows
-  gWindow.removeCookie("c3");
+  yield removeCookie("c3");
 
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["cookies", "http://test1.example.org"],
       [
         getCookieId("c2", "test1.example.org", "/browser"),
         getCookieId("c4", "test1.example.org",
                     "/browser/devtools/client/storage/test/")
       ]
     ],
   ]);
 
   // Check if next element's value is visible in sidebar
   yield findVariableViewProperties([{name: "c2", value: "foobar"}]);
 
-  gWindow.removeCookie("c2", "/browser");
+  yield removeCookie("c2", "/browser");
 
-  yield gUI.once("sidebar-updated");
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["cookies", "http://test1.example.org"],
       [
         getCookieId("c4", "test1.example.org",
                     "/browser/devtools/client/storage/test/")
       ]
     ],
   ]);
 
   // Check if next element's value is visible in sidebar
   yield findVariableViewProperties([{name: "c4", value: "booyeah"}]);
 
-  gWindow.removeCookie("c4");
+  yield removeCookie("c4");
 
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [["cookies", "http://test1.example.org"], [ ]],
   ]);
 
   ok(gUI.sidebar.hidden, "Sidebar is hidden when no rows");
 
   yield finishTests();
 });
+
+function* addCookie(name, value, path) {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, [name, value, path],
+    ([nam, valu, pat]) => {
+      content.wrappedJSObject.addCookie(nam, valu, pat);
+    }
+  );
+}
+
+function* removeCookie(name, path) {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, [name, path],
+    ([nam, pat]) => {
+      content.wrappedJSObject.removeCookie(nam, pat);
+    }
+  );
+}
--- a/devtools/client/storage/test/browser_storage_dynamic_updates_localStorage.js
+++ b/devtools/client/storage/test/browser_storage_dynamic_updates_localStorage.js
@@ -15,43 +15,41 @@ add_task(function* () {
 
   yield checkState([
     [
       ["localStorage", "http://test1.example.org"],
       ["ls1", "ls2", "ls3", "ls4", "ls5", "ls6", "ls7"]
     ],
   ]);
 
-  gWindow.localStorage.removeItem("ls4");
+  yield removeLocalStorageItem("ls4");
 
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["localStorage", "http://test1.example.org"],
       ["ls1", "ls2", "ls3", "ls5", "ls6", "ls7"]
     ],
   ]);
 
-  gWindow.localStorage.setItem("ls4", "again");
+  yield setLocalStorageItem("ls4", "again");
 
-  yield gUI.once("store-objects-updated");
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["localStorage", "http://test1.example.org"],
       ["ls1", "ls2", "ls3", "ls4", "ls5", "ls6", "ls7"]
     ],
   ]);
   // Updating a row
-  gWindow.localStorage.setItem("ls2", "ls2-changed");
+  yield setLocalStorageItem("ls2", "ls2-changed");
 
-  yield gUI.once("store-objects-updated");
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   checkCell("ls2", "value", "ls2-changed");
 
   // Clearing items.
   yield ContentTask.spawn(gBrowser.selectedBrowser, null, function () {
     content.wrappedJSObject.clear();
   });
 
@@ -61,8 +59,24 @@ add_task(function* () {
     [
       ["localStorage", "http://test1.example.org"],
       [ ]
     ],
   ]);
 
   yield finishTests();
 });
+
+function* setLocalStorageItem(key, value) {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, [key, value],
+    ([innerKey, innerValue]) => {
+      content.wrappedJSObject.localStorage.setItem(innerKey, innerValue);
+    }
+  );
+}
+
+function* removeLocalStorageItem(key) {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, key,
+    innerKey => {
+      content.wrappedJSObject.localStorage.removeItem(innerKey);
+    }
+  );
+}
--- a/devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js
+++ b/devtools/client/storage/test/browser_storage_dynamic_updates_sessionStorage.js
@@ -15,53 +15,52 @@ add_task(function* () {
 
   yield checkState([
     [
       ["sessionStorage", "http://test1.example.org"],
       ["ss1", "ss2", "ss3"]
     ],
   ]);
 
-  gWindow.sessionStorage.setItem("ss4", "new-item");
+  yield setSessionStorageItem("ss4", "new-item");
 
-  yield gUI.once("store-objects-updated");
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["sessionStorage", "http://test1.example.org"],
       ["ss1", "ss2", "ss3", "ss4"]
     ],
   ]);
 
   // deleting item
 
-  gWindow.sessionStorage.removeItem("ss3");
+  yield removeSessionStorageItem("ss3");
 
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
-  gWindow.sessionStorage.removeItem("ss1");
+  yield removeSessionStorageItem("ss1");
 
-  yield gUI.once("store-objects-updated");
+  yield gUI.once("store-objects-edit");
 
   yield checkState([
     [
       ["sessionStorage", "http://test1.example.org"],
       ["ss2", "ss4"]
     ],
   ]);
 
   yield selectTableItem("ss2");
 
   ok(!gUI.sidebar.hidden, "sidebar is visible");
 
   // Checking for correct value in sidebar before update
   yield findVariableViewProperties([{name: "ss2", value: "foobar"}]);
 
-  gWindow.sessionStorage.setItem("ss2", "changed=ss2");
+  yield setSessionStorageItem("ss2", "changed=ss2");
 
   yield gUI.once("sidebar-updated");
 
   checkCell("ss2", "value", "changed=ss2");
 
   yield findVariableViewProperties([{name: "ss2", value: "changed=ss2"}]);
 
   // Clearing items.
@@ -75,8 +74,24 @@ add_task(function* () {
     [
       ["sessionStorage", "http://test1.example.org"],
       [ ]
     ],
   ]);
 
   yield finishTests();
 });
+
+function* setSessionStorageItem(key, value) {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, [key, value],
+    ([innerKey, innerValue]) => {
+      content.wrappedJSObject.sessionStorage.setItem(innerKey, innerValue);
+    }
+  );
+}
+
+function* removeSessionStorageItem(key) {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, key,
+    innerKey => {
+      content.wrappedJSObject.sessionStorage.removeItem(innerKey);
+    }
+  );
+}
--- a/devtools/client/storage/test/browser_storage_indexeddb_delete.js
+++ b/devtools/client/storage/test/browser_storage_indexeddb_delete.js
@@ -20,18 +20,17 @@ add_task(function* () {
   ]);
 
   info("do the delete");
   const deletedDb = ["indexedDB", "http://test1.example.org", "idb1 (default)"];
 
   yield selectTreeItem(deletedDb);
 
   // Wait once for update and another time for value fetching
-  let eventWait = gUI.once("store-objects-updated").then(
-    () => gUI.once("store-objects-updated"));
+  let eventWait = gUI.once("store-objects-updated");
 
   let selector = `[data-id='${JSON.stringify(deletedDb)}'] > .tree-widget-item`;
   let target = gPanelWindow.document.querySelector(selector);
   ok(target, `tree item found in ${deletedDb.join(" > ")}`);
   yield waitForContextMenu(contextMenu, target, () => {
     info(`Opened tree context menu in ${deletedDb.join(" > ")}`);
     menuDeleteDb.click();
   });
--- a/devtools/client/storage/test/browser_storage_indexeddb_delete_blocked.js
+++ b/devtools/client/storage/test/browser_storage_indexeddb_delete_blocked.js
@@ -23,25 +23,25 @@ add_task(function* () {
 
   ok(result.blocked, "removeDatabase attempt is blocked");
 
   info("test state after blocked delete");
   yield checkState([
     [["indexedDB", "http://test1.example.org"], ["idb (default)"]]
   ]);
 
-  let eventWait = gUI.once("store-objects-updated");
+  let eventWait = gUI.once("store-objects-edit");
 
   info("telling content to close the db");
   yield ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
     let win = content.wrappedJSObject;
     yield win.closeDb();
   });
 
-  info("waiting for store update events");
+  info("waiting for store edit events");
   yield eventWait;
 
   info("test state after real delete");
   yield checkState([
     [["indexedDB", "http://test1.example.org"], []]
   ]);
 
   info("try to delete database from nonexistent host");
--- a/devtools/client/storage/test/head.js
+++ b/devtools/client/storage/test/head.js
@@ -25,25 +25,25 @@ const MAIN_DOMAIN_WITH_PORT = "http://te
 const ALT_DOMAIN = "http://sectest1.example.org/" + PATH;
 const ALT_DOMAIN_SECURED = "https://sectest1.example.org:443/" + PATH;
 
 // GUID to be used as a separator in compound keys. This must match the same
 // constant in devtools/server/actors/storage.js,
 // devtools/client/storage/ui.js and devtools/server/tests/browser/head.js
 const SEPARATOR_GUID = "{9d414cc5-8319-0a04-0586-c0a6ae01670a}";
 
-var gToolbox, gPanelWindow, gWindow, gUI;
+var gToolbox, gPanelWindow, gUI;
 
 // Services.prefs.setBoolPref(DUMPEMIT_PREF, true);
 // Services.prefs.setBoolPref(DEBUGGERLOG_PREF, true);
 
 Services.prefs.setBoolPref(STORAGE_PREF, true);
 Services.prefs.setBoolPref(CACHES_ON_HTTP_PREF, true);
 registerCleanupFunction(() => {
-  gToolbox = gPanelWindow = gWindow = gUI = null;
+  gToolbox = gPanelWindow = gUI = null;
   Services.prefs.clearUserPref(CACHES_ON_HTTP_PREF);
   Services.prefs.clearUserPref(DEBUGGERLOG_PREF);
   Services.prefs.clearUserPref(DOM_CACHE);
   Services.prefs.clearUserPref(DUMPEMIT_PREF);
   Services.prefs.clearUserPref(STORAGE_PREF);
 });
 
 /**
@@ -52,19 +52,16 @@ registerCleanupFunction(() => {
  *
  * @param url {String} The url to be opened in the new tab
  * @param options {Object} The tab options for the new tab
  *
  * @return {Promise} A promise that resolves after the tab is ready
  */
 function* openTab(url, options = {}) {
   let tab = yield addTab(url, options);
-  let content = tab.linkedBrowser.contentWindowAsCPOW;
-
-  gWindow = content.wrappedJSObject;
 
   // Setup the async storages in main window and for all its iframes
   yield ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
     /**
      * Get all windows including frames recursively.
      *
      * @param {Window} [baseWindow]
      *        The base window at which to start looking for child windows
@@ -214,18 +211,16 @@ function forceCollections() {
   Cu.forceCC();
   Cu.forceShrinkingGC();
 }
 
 /**
  * Cleans up and finishes the test
  */
 function* finishTests() {
-  // Bug 1233497 makes it so that we can no longer yield CPOWs from Tasks.
-  // We work around this by calling clear() via a ContentTask instead.
   while (gBrowser.tabs.length > 1) {
     yield ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
       /**
        * Get all windows including frames recursively.
        *
        * @param {Window} [baseWindow]
        *        The base window at which to start looking for child windows
        *        (optional).
@@ -507,21 +502,27 @@ function matchVariablesViewProperty(prop
 
 /**
  * Click selects a row in the table.
  *
  * @param {[String]} ids
  *        The array id of the item in the tree
  */
 function* selectTreeItem(ids) {
-  /* If this item is already selected, return */
   if (gUI.tree.isSelected(ids)) {
+    info(`"${ids}" is already selected, returning.`);
+    return;
+  }
+  if (!gUI.tree.exists(ids)) {
+    info(`"${ids}" does not exist, returning.`);
     return;
   }
 
+  // The item exists but is not selected... select it.
+  info(`Selecting "${ids}".`);
   let updated = gUI.once("store-objects-updated");
   gUI.tree.selectedItem = ids;
   yield updated;
 }
 
 /**
  * Click selects a row in the table.
  *
@@ -985,17 +986,17 @@ function* performAdd(store) {
 
   if (menuAdd.hidden) {
     is(menuAdd.hidden, false,
        `performAdd called for ${storeName} but it is not supported`);
     return;
   }
 
   let eventEdit = gUI.table.once("row-edit");
-  let eventWait = gUI.once("store-objects-updated");
+  let eventWait = gUI.once("store-objects-edit");
 
   menuAdd.click();
 
   let rowId = yield eventEdit;
   yield eventWait;
 
   let key = type === "cookies" ? "uniqueKey" : "name";
   let value = getCellValue(rowId, key);
--- a/devtools/client/storage/ui.js
+++ b/devtools/client/storage/ui.js
@@ -136,18 +136,18 @@ class StorageUI {
         // is expected and normal so let's ignore the error.
         return;
       }
 
       // The toolbox is open so the error is unexpected and real so let's log it.
       console.error(e);
     });
 
-    this.onUpdate = this.onUpdate.bind(this);
-    this.front.on("stores-update", this.onUpdate);
+    this.onEdit = this.onEdit.bind(this);
+    this.front.on("stores-update", this.onEdit);
     this.onCleared = this.onCleared.bind(this);
     this.front.on("stores-cleared", this.onCleared);
 
     this.handleKeypress = this.handleKeypress.bind(this);
     this._panelDoc.addEventListener("keypress", this.handleKeypress);
 
     this.onTreePopupShowing = this.onTreePopupShowing.bind(this);
     this._treePopup = this._panelDoc.getElementById("storage-tree-popup");
@@ -211,17 +211,17 @@ class StorageUI {
   }
 
   destroy() {
     this.table.off(TableWidget.EVENTS.ROW_SELECTED, this.updateObjectSidebar);
     this.table.off(TableWidget.EVENTS.SCROLL_END, this.handleScrollEnd);
     this.table.off(TableWidget.EVENTS.CELL_EDIT, this.editItem);
     this.table.destroy();
 
-    this.front.off("stores-update", this.onUpdate);
+    this.front.off("stores-update", this.onEdit);
     this.front.off("stores-cleared", this.onCleared);
     this._panelDoc.removeEventListener("keypress", this.handleKeypress);
     this.searchBox.removeEventListener("input", this.filterItems);
     this.searchBox = null;
 
     this.sidebarToggleBtn.removeEventListener("click", this.onPaneToggleButtonClicked);
     this.sidebarToggleBtn = null;
 
@@ -396,17 +396,17 @@ class StorageUI {
    *          }, ...
    *        }
    *        Where store_type1 and store_type2 is one of cookies, indexedDB,
    *        sessionStorage and localStorage; host1, host2 are the host in which
    *        this change happened; and [<store_namesX] is an array of the names
    *        of the changed store objects. This array is empty for deleted object
    *        if the host was completely removed.
    */
-  async onUpdate({ changed, added, deleted }) {
+  async onEdit({ changed, added, deleted }) {
     if (added) {
       await this.handleAddedItems(added);
     }
 
     if (changed) {
       await this.handleChangedItems(changed);
     }
 
@@ -416,24 +416,24 @@ class StorageUI {
     //     display an item that has been deleted.
     //   - An item is added then deleted in the same batch: deleted then added will
     //     display an item that has been deleted.
     if (deleted) {
       await this.handleDeletedItems(deleted);
     }
 
     if (added || deleted || changed) {
-      this.emit("store-objects-updated");
+      this.emit("store-objects-edit");
     }
   }
 
   /**
-   * Handle added items received by onUpdate
+   * Handle added items received by onEdit
    *
-   * @param {object} See onUpdate docs
+   * @param {object} See onEdit docs
    */
   async handleAddedItems(added) {
     for (let type in added) {
       for (let host in added[type]) {
         this.tree.add([type, {id: host, type: "url"}]);
         for (let name of added[type][host]) {
           try {
             name = JSON.parse(name);
@@ -455,19 +455,19 @@ class StorageUI {
           await this.fetchStorageObjects(type, host, added[type][host],
                                           REASON.NEW_ROW);
         }
       }
     }
   }
 
   /**
-   * Handle deleted items received by onUpdate
+   * Handle deleted items received by onEdit
    *
-   * @param {object} See onUpdate docs
+   * @param {object} See onEdit docs
    */
   async handleDeletedItems(deleted) {
     for (let type in deleted) {
       for (let host in deleted[type]) {
         if (!deleted[type][host].length) {
           // This means that the whole host is deleted, thus the item should
           // be removed from the storage tree
           if (this.tree.isSelected([type, host])) {
@@ -507,19 +507,19 @@ class StorageUI {
             }
           }
         }
       }
     }
   }
 
   /**
-   * Handle changed items received by onUpdate
+   * Handle changed items received by onEdit
    *
-   * @param {object} See onUpdate docs
+   * @param {object} See onEdit docs
    */
   async handleChangedItems(changed) {
     let [type, host, db, objectStore] = this.tree.selectedItem;
     if (!changed[type] || !changed[type][host] ||
         changed[type][host].length == 0) {
       return;
     }
     try {