Bug 1345491 - Fix intermittent caused by closing window before extension is unloaded r?gbrown draft
authorMatthew Wein <mwein@mozilla.com>
Mon, 10 Apr 2017 02:21:01 -0400
changeset 559825 41c8fb391756712928c59056e9f9d5ea5b6a53f4
parent 559749 b1364675bdf5dffe63fd60373034293de0b513d5
child 623525 7ab96519712afdb114e7d7f052bbf9590e211e2b
push id53229
push usermwein@mozilla.com
push dateMon, 10 Apr 2017 17:32:18 +0000
reviewersgbrown
bugs1345491
milestone55.0a1
Bug 1345491 - Fix intermittent caused by closing window before extension is unloaded r?gbrown MozReview-Commit-ID: KGk1YGrhX9X
toolkit/components/extensions/test/mochitest/test_ext_proxy.html
--- 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",
     });