Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the webappsec-subresource-integrity IDL file #9849

Prev

Add test

  • Loading branch information...
lukebjerring committed Jun 27, 2018
commit 6eea7b915348cd5209bc207b71c4974947e6e7ad
@@ -0,0 +1,23 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

// https://w3c.github.io/webappsec-subresource-integrity/

'use strict';

promise_test(async () => {
const srcs = ['webappsec-subresource-integrity', 'html', 'dom', 'cssom'];
const [idl, html, dom, cssom] = await Promise.all(
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));

const idl_array = new IdlArray();
idl_array.add_idls(idl);
idl_array.add_dependency_idls(html);
idl_array.add_dependency_idls(dom);
idl_array.add_dependency_idls(cssom);
idl_array.add_objects({
HTMLScriptElement: ['document.createElement("script")'],
HTMLLinkElement: ['document.createElement("link")'],
});
idl_array.test();
}, 'webappsec-subresource-integrity interfaces');
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.