Skip to content

Commit 67880a4

Browse files
ptomatoMs2ger
authored andcommitted
Improve idlharness-ShadowRealm integration
By exposing a fetch_spec() on globalThis in testharness-shadowrealm-inner, we no longer need to have IDL tests in separate files for ShadowRealm, as the regular idlharness.js will just run there. Delete all existing idlharness-shadowrealm.window.js files and incorporate them into their neighbouring idlharness.any.js files. It seems sufficient to run the IDL tests only in shadowrealm-in-window; repeating them in every ShadowRealm scope seems like overkill.
1 parent ebb12b1 commit 67880a4

27 files changed

+45
-113
lines changed

compression/idlharness-shadowrealm.window.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

compression/idlharness.https.any.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// META: script=/resources/WebIDLParser.js
22
// META: script=/resources/idlharness.js
3+
// META: global=window,dedicatedworker,shadowrealm-in-window
34

45
'use strict';
56

console/idlharness-shadowrealm.window.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

console/idlharness.any.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// META: script=/resources/WebIDLParser.js
22
// META: script=/resources/idlharness.js
3+
// META: global=window,dedicatedworker,shadowrealm-in-window
34

45
// https://console.spec.whatwg.org/
56

dom/idlharness-shadowrealm.window.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dom/idlharness.any.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// META: global=worker
1+
// META: global=worker,shadowrealm-in-window
22
// META: script=/resources/WebIDLParser.js
33
// META: script=/resources/idlharness.js
44
// META: timeout=long

encoding/idlharness-shadowrealm.window.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

encoding/idlharness.any.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm-in-window
22
// META: script=/resources/WebIDLParser.js
33
// META: script=/resources/idlharness.js
44

hr-time/idlharness-shadowrealm.window.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

hr-time/idlharness.any.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm-in-window
22
// META: script=/resources/WebIDLParser.js
33
// META: script=/resources/idlharness.js
44
// META: timeout=long
@@ -11,6 +11,10 @@ idl_test(
1111
['hr-time'],
1212
['html', 'dom'],
1313
async idl_array => {
14+
if (self.GLOBAL.isShadowRealm()) {
15+
return;
16+
}
17+
1418
if (self.GLOBAL.isWorker()) {
1519
idl_array.add_objects({ WorkerGlobalScope: ['self'] });
1620
} else {

0 commit comments

Comments
 (0)