Skip to content

Commit

Permalink
Tentative CORS-RFC1918 test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebjerring authored and annevk committed Jun 19, 2018
1 parent 61df0b9 commit 0007ac4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions fetch/cors-rfc1918/idlharness.tentative.any.js
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');
14 changes: 14 additions & 0 deletions interfaces/cors-rfc1918.idl
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;
};

0 comments on commit 0007ac4

Please sign in to comment.