Skip to content

Commit

Permalink
Update the secure-contexts IDL file and test (web-platform-tests#9848)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebjerring authored and Luke Bjerring committed Jun 26, 2018
1 parent ca38b10 commit fee0710
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions interfaces/secure-contexts.idl
@@ -0,0 +1,8 @@
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "Secure Contexts" spec.
// See: https://w3c.github.io/webappsec-secure-contexts/

partial interface WindowOrWorkerGlobalScope {
readonly attribute boolean isSecureContext;
};
20 changes: 20 additions & 0 deletions secure-contexts/idlharness.any.js
@@ -0,0 +1,20 @@
// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

// https://w3c.github.io/webappsec-secure-contexts/

'use strict';

promise_test(async () => {
const idl = await fetch("/interfaces/secure-contexts.idl").then(r => r.text());
const workers = await fetch("/interfaces/dedicated-workers.idl").then(r => r.text());

const idl_array = new IdlArray();
idl_array.add_idls(idl);
idl_array.add_dependency_idls(workers);
idl_array.add_objects({
WindowOrWorkerGlobalScope: ["self"],
});
idl_array.test();
}, "Test IDL implementation of Secure Contexts");

0 comments on commit fee0710

Please sign in to comment.