Bug 630838 - Clear document.popupNode between browser chrome tests.

r=mano, gavin a=tests-only
This commit is contained in:
Marco Bonardo 2011-02-02 17:00:47 +01:00
Родитель 5da7e0ed69
Коммит f765bc316e
4 изменённых файлов: 14 добавлений и 0 удалений

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

@ -169,6 +169,11 @@ Tester.prototype = {
}
};
// Clear document.popupNode. The test could have set it to a custom value
// for its own purposes, nulling it out it will go back to the default
// behavior of returning the last opened popup.
document.popupNode = null;
// Note the test run time
let time = Date.now() - this.lastStartTime;
this.dumper.dump("INFO TEST-END | " + this.currentTest.path + " | finished in " + time + "ms\n");

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

@ -50,6 +50,8 @@ _BROWSER_TEST_FILES = \
browser_pass.js \
browser_async.js \
browser_privileges.js \
browser_popupNode.js \
browser_popupNode_check.js \
# Disabled, these are only good for testing the harness' failure reporting
# browser_zz_fail_openwindow.js \
# browser_fail.js \

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

@ -0,0 +1,4 @@
function test() {
document.popupNode = document;
isnot(document.popupNode, null, "document.popupNode has been correctly set");
}

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

@ -0,0 +1,3 @@
function test() {
is(document.popupNode, null, "document.popupNode has been correctly cleared");
}