-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For whatwg/fetch#1753.
- Loading branch information
Showing
6 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// META: title=realm of Response bytes() | ||
|
||
"use strict"; | ||
|
||
promise_test(async () => { | ||
await new Promise(resolve => { | ||
onload = resolve; | ||
}); | ||
|
||
let iframe = document.createElement("iframe"); | ||
document.body.appendChild(iframe); | ||
iframe.srcdoc = "<!doctype html>"; | ||
await new Promise(resolve => { | ||
iframe.onload = resolve; | ||
}); | ||
|
||
let otherRealm = iframe.contentWindow; | ||
|
||
let ab = await window.Response.prototype.bytes.call(new otherRealm.Response("")); | ||
|
||
assert_true(ab instanceof otherRealm.Uint8Array, "Uint8Array should be created in receiver's realm"); | ||
assert_false(ab instanceof Uint8Array, "Uint8Array should not be created in the bytes() methods's realm"); | ||
}, "realm of the Uint8Array from Response bytes()"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters