Bug 1399550 Explicitly close content page in test_ext_permissions.js draft
authorAndrew Swan <aswan@mozilla.com>
Mon, 02 Oct 2017 14:49:48 -0700
changeset 674345 ae219332c1ca6cec1a8fe0528da712ebe927db68
parent 673759 15f221f491f707b1e8e46da344b6dd5a394b1242
child 674472 92d5cde51e532edc2c87da3d253001d1e0f33758
push id82805
push useraswan@mozilla.com
push dateTue, 03 Oct 2017 16:49:50 +0000
bugs1399550
milestone58.0a1
Bug 1399550 Explicitly close content page in test_ext_permissions.js MozReview-Commit-ID: HnTbRVHXkWR
toolkit/components/extensions/test/xpcshell/test_ext_permissions.js
toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
--- a/toolkit/components/extensions/test/xpcshell/test_ext_permissions.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_permissions.js
@@ -350,17 +350,17 @@ add_task(async function test_alreadyGran
       "page.js": pageScript,
     },
   });
 
   await extension.startup();
 
   await withHandlingUserInput(extension, async () => {
     let url = await extension.awaitMessage("ready");
-    await ExtensionTestUtils.loadContentPage(url, {extension});
+    let page = await ExtensionTestUtils.loadContentPage(url, {extension});
     await extension.awaitMessage("page-ready");
 
     async function checkRequest(arg, expectPrompt, msg) {
       sawPrompt = false;
       extension.sendMessage("request", arg);
       let result = await extension.awaitMessage("request.result");
       ok(result, "request() call succeeded");
       equal(sawPrompt, expectPrompt,
@@ -385,16 +385,17 @@ add_task(async function test_alreadyGran
                        "already granted origin permission");
 
     await checkRequest({origins: ["http://*.optional-domain.com/"]}, true,
                        "optional wildcard origin");
     await checkRequest({origins: ["http://*.optional-domain.com/"]}, false,
                        "already granted optional wildcard origin");
     await checkRequest({origins: ["http://host.optional-domain.com/"]}, false,
                        "host matching optional wildcard origin");
+    await page.close();
   });
 
   await extension.unload();
 });
 
 // IMPORTANT: Do not change this list without review from a Web Extensions peer!
 
 const GRANTED_WITHOUT_USER_PROMPT = [
--- a/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell-common.ini
@@ -70,12 +70,12 @@ skip-if = os == "android"
 skip-if = os == "android"
 [test_ext_storage_telemetry.js]
 skip-if = os == "android" # checking for telemetry needs to be updated: 1384923
 [test_ext_topSites.js]
 skip-if = os == "android"
 [test_native_manifests.js]
 skip-if = os == "android"
 [test_ext_permissions.js]
-skip-if = os == "android" || (os == "mac" && debug) || asan # Bug 1350559, 1399550, 1399375
+skip-if = os == "android" || asan # Bug 1350559, 1399375
 [test_proxy_scripts.js]
 skip-if = os == "linux" # bug 1393940
 [test_proxy_scripts_results.js]