Skip to content

Commit

Permalink
Enable ShadowRealm testing for DOMException
Browse files Browse the repository at this point in the history
Adds the appropriate metadata for the existing tests for the functionality
of DOMException to additionally be tested in a ShadowRealm.

Adds the same IDL array to the IDL tests for DOMExceptions in ShadowRealm
as for DOMExceptions in other realms.
  • Loading branch information
ptomato committed Nov 18, 2024
1 parent 60d6c48 commit 73195b0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// META: global=window,dedicatedworker,shadowrealm

'use strict';

test(function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// META: global=window,dedicatedworker,shadowrealm

test(function() {
assert_own_property(self, "DOMException", "property of global");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// META: global=window,dedicatedworker,shadowrealm

'use strict';

test(function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// META: global=window,dedicatedworker,shadowrealm

"use strict";

test(() => {
Expand Down
12 changes: 11 additions & 1 deletion webidl/idlharness-shadowrealm.window.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// META: script=/resources/testharness-shadowrealm-outer.js
// META: script=/resources/idlharness-shadowrealm.js
idl_test_shadowrealm(["webidl"], []);
idl_test_shadowrealm(
["webidl"],
[],
idl_array => {
idl_array.add_objects({
DOMException: ["new DOMException()",
'new DOMException("my message")',
'new DOMException("my message", "myName")']
});
}
);

0 comments on commit 73195b0

Please sign in to comment.