Bug 1591114 - test_bug260264.html should await SpecialPowers.testPermission r=smaug draft
authorRob Wu <rob@robwu.nl>
Thu, 24 Oct 2019 15:57:38 +0000
changeset 2396012 c8f86e263b968d55799ba44a13f77e1996b3a6b3
parent 2395845 724c75f9d98fa441703a4e36f294672859e138d7
child 2396013 4d7c616c5d1b7cc93ad2e2c6fea6b15492bff430
push id439672
push userreviewbot
push dateThu, 24 Oct 2019 15:57:55 +0000
treeherdertry@4d7c616c5d1b [default view] [failures only]
reviewerssmaug
bugs1591114, 260264
milestone72.0a1
Bug 1591114 - test_bug260264.html should await SpecialPowers.testPermission r=smaug Differential Diff: PHID-DIFF-55bzyuezeey3rzw7rvr2
dom/tests/mochitest/bugs/test_bug260264.html
--- a/dom/tests/mochitest/bugs/test_bug260264.html
+++ b/dom/tests/mochitest/bugs/test_bug260264.html
@@ -28,20 +28,20 @@ SimpleTest.requestFlakyTimeout("untriage
 var a = $("link"),
     checkOpened = function() { ok(window.open("http://example.com"), "not properly opened") },
     checkBlocked = function() { ok(!window.open("http://example.com"), "not properly blocked") };
 
 add_task(async function check_sanity() {
   await new Promise(resolve => setTimeout(resolve, 200));
 
   await SpecialPowers.pushPermissions([{'type': 'popup', 'remove': true, 'context': document}]);
-  ok(SpecialPowers.testPermission('popup', UNKNOWN_ACTION, document), 'popup value should have UNKNOWN permission');
+  ok(await SpecialPowers.testPermission('popup', UNKNOWN_ACTION, document), 'popup value should have UNKNOWN permission');
 
   await SpecialPowers.pushPermissions([{'type': 'popup', 'allow': true, 'context': document}]);
-  ok(SpecialPowers.testPermission('popup', ALLOW_ACTION, document), 'popup value should have ALLOW permission');
+  ok(await SpecialPowers.testPermission('popup', ALLOW_ACTION, document), 'popup value should have ALLOW permission');
 
   await SpecialPowers.pushPrefEnv({"set": [["dom.disable_open_during_load", true],
                                      ["dom.popup_allowed_events", "click mouseup"],
                                      ["dom.popup_maximum", 3]]});
 
   // Note: UNKNOWN_ACTION is the same as DENY_ACTION.
   await SpecialPowers.pushPermissions([{'type': 'popup', 'allow': DENY_ACTION, 'context': document}]);
 });