Commit ccdf7d82 authored by Stefano Sanfilippo's avatar Stefano Sanfilippo Committed by Commit Bot

[Trusted Types] Clean up remaining uses of "trusted-types *" in WPTs.

Change-Id: I91d4c60a38b927ac66d51880ce132bf8ebd93561
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089863
Commit-Queue: Stefano Sanfilippo <ssanfilippo@chromium.org>
Reviewed-by: default avatarDaniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748295}
parent da8c9e3d
...@@ -17,7 +17,6 @@ test(t => { ...@@ -17,7 +17,6 @@ test(t => {
probe.innerHTML = "probe"; probe.innerHTML = "probe";
const doc = new DOMParser().parseFromString(` const doc = new DOMParser().parseFromString(`
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body><div id="probe"></div></body>"`, "text/html"); <body><div id="probe"></div></body>"`, "text/html");
probe.innerHTML = "probe"; probe.innerHTML = "probe";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script'"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
<body> <body>
<div id="container"></div> <div id="container"></div>
<script> <script>
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
<head> <head>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
content="trusted-types *; require-trusted-types-for 'script'">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<head> <head>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body> <body>
<script> <script>
test(t => { test(t => {
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body> <body>
<script> <script>
test(t => { test(t => {
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body> <body>
<script> <script>
test(t => { test(t => {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<script src="/resources/testharness.js" ></script> <script src="/resources/testharness.js" ></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body> <body>
<script> <script>
//No name given test //No name given test
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body> <body>
<div id="target"></div> <div id="target"></div>
<script> <script>
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
<body> <body>
<script> <script>
// Policy settings for all tests // Policy settings for all tests
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
<body> <body>
<div id="target"></div> <div id="target"></div>
<script> <script>
......
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
</head> </head>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
<body> <body>
<script> <script>
// Trusted HTML assignments do not throw. // Trusted HTML assignments do not throw.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
<body> <body>
<script> <script>
// setTimeout tests // setTimeout tests
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script> <script src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
<body> <body>
<script> <script>
// TrustedHTML assignments do not throw. // TrustedHTML assignments do not throw.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<div id="container"></div> <div id="container"></div>
......
Content-Security-Policy-Report-Only: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy-Report-Only: require-trusted-types-for 'script';
Content-Security-Policy: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy: require-trusted-types-for 'script';
Content-Security-Policy-Report-Only: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy-Report-Only: require-trusted-types-for 'script';
Content-Security-Policy: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy: require-trusted-types-for 'script';
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<script nonce="abc" src="/resources/testharness.js"></script> <script nonce="abc" src="/resources/testharness.js"></script>
<script nonce="abc" src="/resources/testharnessreport.js"></script> <script nonce="abc" src="/resources/testharnessreport.js"></script>
<script nonce="abc" src="support/helper.sub.js"></script> <script nonce="abc" src="support/helper.sub.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script';"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- Note: Trusted Types enforcement, and a CSP that allows all eval. --> <!-- Note: Trusted Types enforcement, and a CSP that allows all eval. -->
<meta http-equiv="Content-Security-Policy" <meta http-equiv="Content-Security-Policy"
content="script-src 'nonce-abc' 'unsafe-eval'; trusted-types *; require-trusted-types-for 'script'"> content="script-src 'nonce-abc' 'unsafe-eval'; require-trusted-types-for 'script'">
</head> </head>
<body> <body>
<script nonce="abc"> <script nonce="abc">
......
Content-Security-Policy-Report-Only: trusted-types * Content-Security-Policy-Report-Only: require-trusted-types-for 'script'
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<head> <head>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *">
</head> </head>
<body> <body>
<script> <script>
...@@ -42,4 +41,4 @@ ...@@ -42,4 +41,4 @@
assert_equals(s.innerText.toString(), "1"); assert_equals(s.innerText.toString(), "1");
}, name + "empty default"); }, name + "empty default");
}); });
</script> </script>
\ No newline at end of file
Content-Security-Policy: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy: require-trusted-types-for 'script';
Content-Security-Policy-Report-Only: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy-Report-Only: require-trusted-types-for 'script';
Content-Security-Policy: trusted-types *; require-trusted-types-for 'script'; Content-Security-Policy: require-trusted-types-for 'script';
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<head> <head>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types * 'allow-duplicates'; require-trusted-types-for 'script'"> <meta http-equiv="Content-Security-Policy"
content="trusted-types policy default 'allow-duplicates'; require-trusted-types-for 'script'">
</head> </head>
<body> <body>
<script> <script>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
// (rather than as "<meta http-equiv" tags). This test assumes the following // (rather than as "<meta http-equiv" tags). This test assumes the following
// headers are set in the .headers file: // headers are set in the .headers file:
// //
// Content-Security-Policy: trusted-types *
// Content-Security-Policy: script-src 'unsafe-inline' 'unsafe-eval'; report-uri ... // Content-Security-Policy: script-src 'unsafe-inline' 'unsafe-eval'; report-uri ...
// Content-Security-Policy: plugin-types bla/blubb // Content-Security-Policy: plugin-types bla/blubb
// Content-Security-Policy-Report-Only: require-trusted-types-for 'script'
// //
// The last rule is there so we can provoke a CSP violation report at will. // The last rule is there so we can provoke a CSP violation report at will.
// The intent is that in order to test that a violation has *not* been thrown // The intent is that in order to test that a violation has *not* been thrown
......
Content-Security-Policy-Report-Only: trusted-types *
Content-Security-Policy: script-src http: https: 'nonce-123' 'unsafe-eval' Content-Security-Policy: script-src http: https: 'nonce-123' 'unsafe-eval'
Content-Security-Policy: plugin-types bla/blubb Content-Security-Policy: plugin-types bla/blubb
Content-Security-Policy-Report-Only: require-trusted-types-for 'script' Content-Security-Policy-Report-Only: require-trusted-types-for 'script'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<meta http-equiv="Content-Security-Policy" content="trusted-types *; require-trusted-types-for 'script'"> <meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
</head> </head>
<body> <body>
<script> <script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment