Bug 663709 - browser_tabview_bug627288.js depends on other tests; f=raymond, r=dietrich
authorTim Taubert <tim.taubert@gmx.de>
Tue, 14 Jun 2011 10:41:18 +0200
changeset 71025 c85a385462a6844b5b72f13c11009d0e788fd966
parent 71024 383144856ca0a7d2dc21e544e78435d5168c7b9e
child 71026 d6588d422737e651503b63df97e0ab108e4bc009
push id57
push usertim.taubert@gmx.de
push dateTue, 14 Jun 2011 08:42:07 +0000
treeherdermozilla-inbound@d58376753a93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs663709, 627288
milestone7.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 663709 - browser_tabview_bug627288.js depends on other tests; f=raymond, r=dietrich
browser/base/content/test/tabview/browser_tabview_bug627288.js
--- a/browser/base/content/test/tabview/browser_tabview_bug627288.js
+++ b/browser/base/content/test/tabview/browser_tabview_bug627288.js
@@ -10,32 +10,34 @@ function test() {
 
     afterAllTabsLoaded(function () {
       let tabItem = tab._tabViewTabItem;
       let data = tabItem.getStorageData(true);
       gBrowser.removeTab(tab);
 
       cw.TabItems.pauseReconnecting();
       tab = gBrowser.loadOneTab('http://mochi.test:8888/', {inBackground: true});
-      cw.Storage.saveTab(tab, data);
 
-      whenTabAttrModified(tab, function () {
+      afterAllTabsLoaded(function () {
         tabItem = tab._tabViewTabItem;
 
-        // Hook into loadedCachedImageData since loading cached thumbnails 
-        // is asynchronous.
-        tabItem.addSubscriber(tabItem, "loadedCachedImageData", function(item) {
-          item.removeSubscriber(item, "loadedCachedImageData");
+        tabItem.addSubscriber(tabItem, "savedCachedImageData", function () {
+          tabItem.removeSubscriber(tabItem, "savedCachedImageData");
+
+          tabItem.addSubscriber(tabItem, "loadedCachedImageData", function () {
+            tabItem.removeSubscriber(tabItem, "loadedCachedImageData");
 
-          ok(tabItem.isShowingCachedData(), 'tabItem shows cached data');
+            ok(tabItem.isShowingCachedData(), 'tabItem shows cached data');
+            testChangeUrlAfterReconnect();
+          });
 
-          testChangeUrlAfterReconnect();
+          cw.TabItems.resumeReconnecting();
         });
 
-        cw.TabItems.resumeReconnecting();
+        cw.Storage.saveTab(tab, data);
       });
     });
   }
 
   let testChangeUrlAfterReconnect = function () {
     tab.linkedBrowser.loadURI('http://mochi.test:8888/browser/');
 
     whenTabAttrModified(tab, function () {