gecko/toolkit/content/tests/browser/browser_bug594509.js
Justin Wood 29c2415b89 Test for Bug 594509 does not unregister its load listener. (Bug 595188). r=gavin
[SeaMonkey 2.1, mochitest-browser-chrome] TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/toolkit/content/tests/browser/browser_bug594509.js | about:rights content loaded
a=gavin
2010-09-18 11:07:01 +01:00

20 lines
647 B
JavaScript

function check_about_rights(tab) {
let doc = gBrowser.getBrowserForTab(tab).contentDocument;
ok(doc.getElementById("your-rights"), "about:rights content loaded");
gBrowser.removeTab(tab);
finish();
}
function test() {
waitForExplicitFinish();
let tab = gBrowser.selectedTab = gBrowser.addTab("about:blank");
let browser = gBrowser.getBrowserForTab(tab);
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);
ok(true, "about:rights loaded");
executeSoon(function() { check_about_rights(tab); });
}, true);
browser.loadURI("about:rights", null, null);
}