Bug 1167579 - Fix intermittent browser_broadcast.js failures by removing unneeded check that was missing a flush() call. r=billm, a=test-only
authorTim Taubert <ttaubert@mozilla.com>
Fri, 29 May 2015 01:18:49 +0200
changeset 274951 fd63e1ef8cbda12ed3429e6dbb2f62cbf0d42631
parent 274950 8af577b1006e85f9492f75c1ded9d983957fc455
child 274952 f25907a388cc868f6fd2cb64999414c26980b150
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, test-only
bugs1167579
milestone40.0a2
Bug 1167579 - Fix intermittent browser_broadcast.js failures by removing unneeded check that was missing a flush() call. r=billm, a=test-only
browser/components/sessionstore/test/browser_broadcast.js
--- a/browser/components/sessionstore/test/browser_broadcast.js
+++ b/browser/components/sessionstore/test/browser_broadcast.js
@@ -49,23 +49,19 @@ add_task(function flush_on_quit_requeste
  * duplicating a tab.
  */
 add_task(function flush_on_duplicate() {
   let tab = yield createTabWithStorageData(["http://example.com"]);
   let browser = tab.linkedBrowser;
 
   yield modifySessionStorage(browser, {test: "on-duplicate"});
   let tab2 = ss.duplicateTab(window, tab);
-  let {storage} = JSON.parse(ss.getTabState(tab2));
-  is(storage["http://example.com"].test, "on-duplicate",
-    "sessionStorage data has been flushed when duplicating tabs");
-
   yield promiseTabRestored(tab2);
   yield promiseRemoveTab(tab2);
-  [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
+  let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window));
   is(storage["http://example.com"].test, "on-duplicate",
     "sessionStorage data has been flushed when duplicating tabs");
 
   gBrowser.removeTab(tab);
 });
 
 /**
  * This test ensures we won't lose tab data queued in the content script when