Bug 1345491 - Fix intermittent caused by closing window before extension is unloaded r?gbrown
MozReview-Commit-ID: KGk1YGrhX9X
--- a/toolkit/components/extensions/test/mochitest/test_ext_proxy.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_proxy.html
@@ -32,25 +32,26 @@ function* testProxyScript(script, expect
},
});
yield extension.startup();
let win = window.open("http://example.com/");
let error = yield extension.awaitMessage("proxy-error-received");
is(error.message, expected.message, "Correct error message received");
- win.close();
if (expected.errorInfo) {
ok(error.fileName.includes("proxy_script.js"), "Error should include file name");
is(error.lineNumber, 3, "Error should include line number");
ok(error.stack.includes("proxy_script.js:3:9"), "Error should include stack trace");
}
yield extension.unload();
+
+ win.close();
}
add_task(function* test_invalid_FindProxyForURL_type() {
yield testProxyScript(
() => { }, {
message: "The proxy script must define FindProxyForURL as a function",
});