Skip to content

Commit 146ca80

Browse files
mystormoz-wptsync-bot
authored andcommitted
Part 6: Fix bug in wpt test
It appears the about-blank.https.sub.html test incorrectly was resolving the `createBlankIframe` test with the load event object, rather than with the created iframe, which led to an exception being thrown when accessing the `contentDocument` property. This patch makes returning the iframe explicit, fixing that failure. Differential Revision: https://phabricator.services.mozilla.com/D236975 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1665474 gecko-commit: dafc01f02f5be174a76db78acdca35da27b52dc2 gecko-reviewers: farre
1 parent c89a1ad commit 146ca80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

html/browsers/origin/origin-keyed-agent-clusters/about-blank.https.sub.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@
5252
await setBothDocumentDomains(iframe.contentWindow);
5353
}
5454

55-
function createBlankIframe() {
55+
async function createBlankIframe() {
5656
const iframe = document.createElement("iframe");
5757
const promise = new Promise(resolve => {
5858
iframe.addEventListener("load", resolve);
5959
});
6060
document.body.append(iframe);
61-
return promise;
61+
await promise;
62+
return iframe;
6263
}
6364
</script>

0 commit comments

Comments
 (0)