Bug 666475 - Intermittent browser_tabview_privatebrowsing.js | Test timed out; r=ehsan
☠☠ backed out by 0280ba55c538 ☠ ☠
authorTim Taubert <tim.taubert@gmx.de>
Fri, 24 Jun 2011 10:29:13 +0200
changeset 71695 8e1bf0b98a3008087c8388f4ae1016a57b527fc5
parent 71654 58f8e32a9fafd0808c154811db9b64ebede60726
child 71696 5abf332b2c45b4f7d043dc73e2f1289b4c0e9efd
push id20601
push usermak77@bonardo.net
push dateSat, 25 Jun 2011 10:05:20 +0000
treeherdermozilla-central@48ad4ffc4230 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs666475
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 666475 - Intermittent browser_tabview_privatebrowsing.js | Test timed out; r=ehsan
browser/base/content/test/tabview/browser_tabview_privatebrowsing.js
--- a/browser/base/content/test/tabview/browser_tabview_privatebrowsing.js
+++ b/browser/base/content/test/tabview/browser_tabview_privatebrowsing.js
@@ -17,17 +17,17 @@ function test() {
   showTabView(onTabViewLoadedAndShown);
 }
 
 // -----------
 function onTabViewLoadedAndShown() {
   ok(TabView.isVisible(), "Tab View is visible");
 
   // Establish initial state
-  contentWindow = document.getElementById("tab-view").contentWindow;
+  contentWindow = TabView.getContentWindow();
   verifyCleanState("start");
 
   // register a clean up for private browsing just in case
   registerCleanupFunction(function() {
     pb.privateBrowsingEnabled = false;
   });
 
   // create a group
@@ -45,50 +45,47 @@ function onTabViewLoadedAndShown() {
   // collect the group titles
   let count = contentWindow.GroupItems.groupItems.length;
   for (let a = 0; a < count; a++) {
     let gi = contentWindow.GroupItems.groupItems[a];
     groupTitles[a] = gi.getTitle();
   }
 
   // Create a second tab
-  gBrowser.loadOneTab("about:robots", { inBackground: false });
+  gBrowser.addTab("about:robots");
   is(gBrowser.tabs.length, 2, "we now have 2 tabs");
   registerCleanupFunction(function() {
     gBrowser.removeTab(gBrowser.tabs[1]);
   });
 
   afterAllTabsLoaded(function() {
-    showTabView(function() {
-      // Get normal tab urls
-      for (let a = 0; a < gBrowser.tabs.length; a++)
-        normalURLs.push(gBrowser.tabs[a].linkedBrowser.currentURI.spec);
+    // Get normal tab urls
+    for (let a = 0; a < gBrowser.tabs.length; a++)
+      normalURLs.push(gBrowser.tabs[a].linkedBrowser.currentURI.spec);
 
-      // verify that we're all set up for our test
-      verifyNormal();
+    // verify that we're all set up for our test
+    verifyNormal();
 
-      // go into private browsing and make sure Tab View becomes hidden
-      togglePBAndThen(function() {
-        whenTabViewIsHidden(function() {
-          ok(!TabView.isVisible(), "Tab View is no longer visible");
-
-          verifyPB();
+    // go into private browsing and make sure Tab View becomes hidden
+    togglePBAndThen(function() {
+      whenTabViewIsHidden(function() {
+        ok(!TabView.isVisible(), "Tab View is no longer visible");
+        verifyPB();
 
-          // exit private browsing and make sure Tab View is shown again
-          togglePBAndThen(function() {
-            whenTabViewIsShown(function() {
-              ok(TabView.isVisible(), "Tab View is visible again");
-              verifyNormal();
+        // exit private browsing and make sure Tab View is shown again
+        togglePBAndThen(function() {
+          whenTabViewIsShown(function() {
+            ok(TabView.isVisible(), "Tab View is visible again");
+            verifyNormal();
 
-              hideTabView(onTabViewHidden);
-            });
+            hideTabView(onTabViewHidden);
           });
         });
       });
-    }); 
+    });
   });
 }
 
 // -----------
 function onTabViewHidden() {
   ok(!TabView.isVisible(), "Tab View is not visible");
   
   // go into private browsing and make sure Tab View remains hidden