Skip to content
This repository has been archived by the owner on Oct 3, 2018. It is now read-only.

Commit

Permalink
[Endurance] Revert waitForPageLoad() workarounds, fixed in that mozmi…
Browse files Browse the repository at this point in the history
…ll 1.5.12
  • Loading branch information
Nephyrin committed May 9, 2012
1 parent 8cbd05d commit 6fcf1a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
15 changes: 1 addition & 14 deletions mozmill_endurance_test/tabs.js
Expand Up @@ -184,19 +184,6 @@ tabBrowser.prototype = {
this._controller.window.TabsOnTop.enabled = aValue; this._controller.window.TabsOnTop.enabled = aValue;
}, },


/**
* Waits for page load, avoiding the controller.waitForPageLoad() call as a
* HACK around bug 751424 - remove when fixed
*/
waitForActiveTabComplete : function tabBrowserwaitForActiveTabComplete()
{
this._controller.sleep(1000);
var tab = this._controller.tabs.activeTab;
return this._controller.waitFor(function () {
return tab.readyState == "complete";
}, null, 60000, 100);
},

/** /**
* Close all tabs of the window except the last one and open a blank page. * Close all tabs of the window except the last one and open a blank page.
*/ */
Expand All @@ -207,7 +194,7 @@ tabBrowser.prototype = {
} }


this._controller.open("about:blank"); this._controller.open("about:blank");
this.waitForActiveTabComplete(); this._controller.waitForPageLoad();
}, },


/** /**
Expand Down
7 changes: 2 additions & 5 deletions mozmill_endurance_test/test1.js
Expand Up @@ -221,8 +221,7 @@ function testMemoryUsage() {
var site = TEST_SITES[siteIndex]; var site = TEST_SITES[siteIndex];


controller.open(site); controller.open(site);
// controller.waitForPageLoad(controller.tabs.activeTab, 60000, 500); controller.waitForPageLoad(controller.tabs.activeTab, 60000, 500);
tabBrowser.waitForActiveTabComplete(); // FIXME revert to ^ when 751424 is fixed
controller.assert(function () { return controller.tabs.activeTab.readyState == "complete"; }); controller.assert(function () { return controller.tabs.activeTab.readyState == "complete"; });
if (perTabPause) controller.sleep(perTabPause * 1000) if (perTabPause) controller.sleep(perTabPause * 1000)
}); });
Expand All @@ -233,9 +232,7 @@ function testMemoryUsage() {
waitGC(); waitGC();
enduranceManager.addCheckpoint("TabsOpenForceGC"); enduranceManager.addCheckpoint("TabsOpenForceGC");
tabBrowser.closeAllTabs(); tabBrowser.closeAllTabs();
// controller.waitForPageLoad(controller.tabs.activeTab); controller.waitForPageLoad(controller.tabs.activeTab);
tabBrowser.waitForActiveTabComplete(); // FIXME revert to ^ when 751424 is fixed

enduranceManager.addCheckpoint("TabsClosed"); enduranceManager.addCheckpoint("TabsClosed");
controller.sleep(30000); controller.sleep(30000);
enduranceManager.addCheckpoint("TabsClosedSettled"); enduranceManager.addCheckpoint("TabsClosedSettled");
Expand Down

0 comments on commit 6fcf1a1

Please sign in to comment.