Skip to content

Commit 8fc1fc6

Browse files
committed
Tests: Make the trusted-html iframe test case fail fast when no support
1 parent 3a00240 commit 8fc1fc6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/data/trusted-html.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
<script src="../../dist/jquery.min.js"></script>
1010
<script src="iframeTest.js"></script>
1111
<script>
12+
if ( typeof trustedTypes === "undefined" ) {
13+
startIframeTest( [ {
14+
actual: "",
15+
expected: "trustedTypes support",
16+
message: "trustedTypes supported"
17+
} ] );
18+
throw new Error( "No trustedTypes support; this test should be skipped" );
19+
}
20+
1221
var i, input, elem, tags,
1322
results = [],
1423
policy = trustedTypes.createPolicy( "jquery-test-policy", {

0 commit comments

Comments
 (0)