Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Bjerring committed Jul 23, 2018
1 parent 8e48714 commit e2deb12
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions hr-time/idlharness.any.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js

Expand All @@ -11,10 +12,25 @@ function cast(i, t) {

idl_test(
['hr-time'],
['html', 'dom'],
idl_array => {
[], // Deps handled below.
async idl_array => {
const [html, dom] = await Promise.all(['html', 'dom'].map(
i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));

// NOTE(lukebjerring): Manually adding untested parent interfaces until
// https://github.com/web-platform-tests/wpt/issues/8053 is resolved.
if (self.GLOBAL.isWorker()) {
idl_array.add_untested_idls(html, { only: ['WorkerGlobalScope'] });
idl_array.add_objects({ WorkerGlobalScope: ['self'] });
} else {
idl_array.add_untested_idls(html, { only: ['Window'] });
idl_array.add_objects({ Window: ['self'] });
}
idl_array.add_objects({
Performance: ['performance'],
});

idl_array.add_dependency_idls(html);
idl_array.add_dependency_idls(dom);
},
'hr-time interfaces.');

0 comments on commit e2deb12

Please sign in to comment.