OLD | NEW |
| 1 <?php |
| 2 header("Content-Security-Policy: sandbox allow-scripts"); |
| 3 ?> |
1 <!DOCTYPE html> | 4 <!DOCTYPE html> |
2 <html> | 5 <html> |
3 <head> | 6 <head> |
4 <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts"> | |
5 <script src="/resources/testharness.js"></script> | 7 <script src="/resources/testharness.js"></script> |
6 <script src="/resources/testharnessreport.js"></script> | 8 <script src="/resources/testharnessreport.js"></script> |
7 </head> | 9 </head> |
8 <body> | 10 <body> |
9 <script> | 11 <script> |
10 test(function () { | 12 test(function () { |
11 var result = alert("Yay!"); | 13 var result = alert("Yay!"); |
12 assert_equals(result, undefined); | 14 assert_equals(result, undefined); |
13 }, "alert() returns synchronously in a sandboxed page without blocking o
n user input."); | 15 }, "alert() returns synchronously in a sandboxed page without blocking o
n user input."); |
14 | 16 |
15 test(function () { | 17 test(function () { |
16 var result = print(); | 18 var result = print(); |
17 assert_equals(result, undefined); | 19 assert_equals(result, undefined); |
18 }, "print() returns synchronously in a sandboxed page without blocking o
n user input."); | 20 }, "print() returns synchronously in a sandboxed page without blocking o
n user input."); |
19 | 21 |
20 test(function () { | 22 test(function () { |
21 var result = confirm("Question?"); | 23 var result = confirm("Question?"); |
22 assert_equals(result, false); | 24 assert_equals(result, false); |
23 }, "confirm() returns 'false' synchronously in a sandboxed page without
blocking on user input."); | 25 }, "confirm() returns 'false' synchronously in a sandboxed page without
blocking on user input."); |
24 | 26 |
25 test(function () { | 27 test(function () { |
26 var result = prompt("Question?"); | 28 var result = prompt("Question?"); |
27 assert_equals(result, null); | 29 assert_equals(result, null); |
28 }, "prompt() returns 'null' synchronously in a sandboxed page without bl
ocking on user input."); | 30 }, "prompt() returns 'null' synchronously in a sandboxed page without bl
ocking on user input."); |
29 </script> | 31 </script> |
30 </body> | 32 </body> |
31 </html> | 33 </html> |
OLD | NEW |