зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550467 - Also install SimpleTest.is into the fission window. r=botond
I split this out so it's more obvious what pieces need to be modified to add additional functions. Differential Revision: https://phabricator.services.mozilla.com/D32188 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
575727cc8b
Коммит
ff26c575c6
|
@ -29,6 +29,8 @@ class FissionTestHelperChild extends JSWindowActorChild {
|
|||
let cw = this.cw();
|
||||
Cu.exportFunction((cond, msg) => this.sendAsyncMessage("ok", {cond, msg}),
|
||||
cw, { defineAs: "ok" });
|
||||
Cu.exportFunction((a, b, msg) => this.sendAsyncMessage("is", {a, b, msg}),
|
||||
cw, { defineAs: "is" });
|
||||
|
||||
let FissionTestHelper = Cu.createObjectIn(cw, { defineAs: "FissionTestHelper" });
|
||||
FissionTestHelper.startTestPromise =
|
||||
|
|
|
@ -45,6 +45,10 @@ class FissionTestHelperParent extends JSWindowActorParent {
|
|||
FissionTestHelperParent.SimpleTest.ok(msg.data.cond, this.docURI() + " | " + msg.data.msg);
|
||||
break;
|
||||
|
||||
case "is":
|
||||
FissionTestHelperParent.SimpleTest.is(msg.data.a, msg.data.b, this.docURI() + " | " + msg.data.msg);
|
||||
break;
|
||||
|
||||
case "Test:Complete":
|
||||
this._testCompletePromiseResolver();
|
||||
break;
|
||||
|
|
|
@ -29,7 +29,7 @@ async function* test() {
|
|||
.useRemoteSubframes,
|
||||
"OOP iframe is actually OOP");
|
||||
let iframeResult = await FissionTestHelper.sendToOopif(iframeElement, "20 + 22");
|
||||
ok(iframeResult == 42, "Basic content fission test works");
|
||||
is(iframeResult, 42, "Basic content fission test works");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче