Bug 666475 - Intermittent browser_tabview_privatebrowsing.js | Test timed out; r=ehsan

This commit is contained in:
Tim Taubert 2011-08-04 03:49:43 +02:00
Родитель 9fe8d056e1
Коммит 29c780e507
1 изменённых файлов: 19 добавлений и 22 удалений

Просмотреть файл

@ -22,7 +22,7 @@ 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
@ -50,40 +50,37 @@ function onTabViewLoadedAndShown() {
}
// 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");
// 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();
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);
});
});
});
});
});
});
}