From a267df61aba027389228b94f58d3b64d14238efe Mon Sep 17 00:00:00 2001 From: Jim Mathies Date: Fri, 21 Jun 2013 15:50:31 -0500 Subject: [PATCH] Bug 885536 - Do a better job of cleaning up tabs in browser_tabs test. r=sfoster --- browser/metro/base/tests/mochiperf/browser_tabs_01.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/metro/base/tests/mochiperf/browser_tabs_01.js b/browser/metro/base/tests/mochiperf/browser_tabs_01.js index 42b1a524a32..d56e873fe5d 100644 --- a/browser/metro/base/tests/mochiperf/browser_tabs_01.js +++ b/browser/metro/base/tests/mochiperf/browser_tabs_01.js @@ -15,7 +15,7 @@ function timeTab(aUrl) { let tab = Browser.addTab(aUrl, true); yield tab.pageShowPromise; stopwatch.stop(); - Browser.closeTab(tab) + Browser.closeTab(tab, { forceClose: true }) yield waitForMs(500); throw new Task.Result(stopwatch.time()); }); @@ -33,6 +33,10 @@ gTests.push({ let time = yield timeTab("about:blank"); openDataSet.push(time); } + + // Give the browser a little time to clean up its tabs. 2 because + // we open a tab above as a base to get rid of the start screen. + yield waitForCondition(() => Browser.tabs.length == 2); PerfTest.declareTest("FBD7A532-D63A-44B5-9744-5CB07CFD131A", "tab open", "browser", "ux",