Bug 1532795: Part 3 - Update random test to use SpecialPowers.spawn for cross-process iframe access. r=nika
☠☠ backed out by f9bf5e4b0b4f ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Tue, 18 Jun 2019 20:49:35 -0700
changeset 540544 fbbe113aeef2f44741248ef15be66562e66adf6c
parent 540543 8a3d311c7fac75b5902f2fa9dc651137a499fc18
child 540545 119caddcb0660754f9bce5e7153bfc92dc211d57
push id11529
push userarchaeopteryx@coole-files.de
push dateThu, 04 Jul 2019 15:22:33 +0000
treeherdermozilla-beta@ebb510a784b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1532795
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532795: Part 3 - Update random test to use SpecialPowers.spawn for cross-process iframe access. r=nika Differential Revision: https://phabricator.services.mozilla.com/D35297
docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
--- a/docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
+++ b/docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
@@ -39,28 +39,30 @@ function checkLoadFrame1() {
   SpecialPowers.wrap(myFrame1.contentWindow).location.hash = "#bar";
   is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, SAME_ORIGIN_URI + "#bar",
     "initial same origin dummy#bar loaded into iframe1");
 
   myFrame1.addEventListener("load", checkNavFrame1);
   myFrame1.src = CROSS_ORIGIN_URI;
 }
 
-function checkNavFrame1() {
+async function checkNavFrame1() {
   myFrame1.removeEventListener("load", checkNavFrame1);
-  is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, CROSS_ORIGIN_URI,
+  is(await SpecialPowers.spawn(myFrame1, [], () => this.content.location.href),
+     CROSS_ORIGIN_URI,
     "cross origin dummy loaded into frame1");
 
   myFrame1.addEventListener("load", checkBackNavFrame1);
   myFrame1.src = SAME_ORIGIN_URI + "#bar";
 }
 
-function checkBackNavFrame1() {
+async function checkBackNavFrame1() {
   myFrame1.removeEventListener("load", checkBackNavFrame1);
-  is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, SAME_ORIGIN_URI + "#bar",
+  is(await SpecialPowers.spawn(myFrame1, [], () => this.content.location.href),
+     SAME_ORIGIN_URI + "#bar",
     "navagiating back to same origin dummy for frame1");
   checkFinish();
 }
 
 // ---- test 2 ----
 
 let myFrame2 = document.createElement("iframe");
 myFrame2.src = "about:blank";