forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61df0b9
commit 0007ac4
Showing
2 changed files
with
34 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// META: script=/resources/WebIDLParser.js | ||
// META: script=/resources/idlharness.js | ||
|
||
promise_test(async () => { | ||
const idl = await fetch('/interfaces/cors-rfc1918.idl').then(r => r.text()); | ||
const html = await fetch('/interfaces/html.idl').then(r => r.text()); | ||
const dom = await fetch('/interfaces/dom.idl').then(r => r.text()); | ||
|
||
const idlArray = new IdlArray(); | ||
idlArray.add_idls(idl); | ||
idlArray.add_dependency_idls(html); | ||
idlArray.add_dependency_idls(dom); | ||
|
||
const objects = { | ||
Document: ['document'], | ||
WorkerGlobalScope: ['self'], | ||
}; | ||
idlArray.add_objects(objects); | ||
idlArray.test(); | ||
}, 'Test CORS RFC1918 interfaces'); |
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,14 @@ | ||
// GENERATED CONTENT - DO NOT EDIT | ||
// Content of this file was automatically extracted from the | ||
// "CORS and RFC1918" spec. | ||
// See: https://wicg.github.io/cors-rfc1918/ | ||
|
||
enum AddressSpace { "local", "private", "public" }; | ||
|
||
partial interface Document { | ||
readonly attribute AddressSpace addressSpace; | ||
}; | ||
|
||
partial interface WorkerGlobalScope { | ||
readonly attribute AddressSpace addressSpace; | ||
}; |