mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 573779: Log which tabs were left at the end of a test. r=gavin
This commit is contained in:
parent
cc3cc69a82
commit
455f8a5916
@ -72,11 +72,13 @@ Tester.prototype = {
|
|||||||
|
|
||||||
waitForWindowsState: function Tester_waitForWindowsState(aCallback) {
|
waitForWindowsState: function Tester_waitForWindowsState(aCallback) {
|
||||||
if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) {
|
if (this.currentTest && window.gBrowser && gBrowser.tabs.length > 1) {
|
||||||
let msg = "Found " + (gBrowser.tabs.length - 1) +
|
while (gBrowser.tabs.length > 1) {
|
||||||
" unexpected tab(s) at the end of test run";
|
let lastTab = gBrowser.tabContainer.lastChild;
|
||||||
this.currentTest.addResult(new testResult(false, msg, "", false));
|
let msg = "Found an unexpected tab at the end of test run: " +
|
||||||
while (gBrowser.tabs.length > 1)
|
lastTab.linkedBrowser.currentURI.spec;
|
||||||
gBrowser.removeTab(gBrowser.tabContainer.lastChild);
|
this.currentTest.addResult(new testResult(false, msg, "", false));
|
||||||
|
gBrowser.removeTab(lastTab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dumper.dump("TEST-INFO | checking window state\n");
|
this.dumper.dump("TEST-INFO | checking window state\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user