OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Security-Policy" content="script-nonce noncyno
nce;"> | 4 <meta http-equiv="Content-Security-Policy" content="script-src 'nonce-no
ncynonce'"> |
5 <script nonce="noncynonce"> | 5 <script nonce="noncynonce"> |
6 if (window.testRunner) | 6 if (window.testRunner) |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 alert('PASS (1/2)'); | 8 alert('PASS (1/2)'); |
9 </script> | 9 </script> |
10 <script nonce=" noncynonce "> | 10 <script nonce=" noncynonce "> |
11 alert('PASS (2/2)'); | 11 alert('PASS (2/2)'); |
12 </script> | 12 </script> |
13 <script nonce="noncynonce noncynonce"> | 13 <script nonce="noncynonce noncynonce"> |
14 alert('FAIL (1/3)'); | 14 alert('FAIL (1/3)'); |
15 </script> | 15 </script> |
16 <script> | 16 <script> |
17 alert('FAIL (2/3)'); | 17 alert('FAIL (2/3)'); |
18 </script> | 18 </script> |
19 <script nonce="noncynonceno?"> | 19 <script nonce="noncynonceno?"> |
20 alert('FAIL (3/3)'); | 20 alert('FAIL (3/3)'); |
21 </script> | 21 </script> |
22 </head> | 22 </head> |
23 <body> | 23 <body> |
24 <p> | 24 <p> |
25 This tests the effect of a valid script-nonce value. It passes if | 25 This tests the effect of a valid script-nonce value. It passes if |
26 three console warnings are visible, and the two PASS alerts are | 26 three console warnings are visible, and the two PASS alerts are |
27 executed. | 27 executed. |
28 </p> | 28 </p> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |