| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>External classic scripts with nomodule content attribute must not run</ti
tle> |
| 5 <link rel="author" title="Yusuke Suzuki" href="mailto:utatane.tea@gmail.com"> |
| 6 <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> |
| 7 <script src="/resources/testharness.js"></script> |
| 8 <script src="/resources/testharnessreport.js"></script> |
| 9 </head> |
| 10 <body> |
| 11 <script> |
| 12 |
| 13 window.executed = false; |
| 14 window.loaded = false; |
| 15 window.errored = false; |
| 16 </script> |
| 17 <script src="./resources/set-script-executed.js" onload="loaded = true" onerror=
"errored = false"></script> |
| 18 <script> |
| 19 |
| 20 test(() => { |
| 21 assert_true(executed); |
| 22 assert_true(loaded); |
| 23 assert_false(errored); |
| 24 }, 'A synchronously loaded external classic script without nomodule content attr
ibute must run'); |
| 25 |
| 26 window.executed = false; |
| 27 window.loaded = false; |
| 28 window.errored = false; |
| 29 </script> |
| 30 <script nomodule src="./resources/set-script-executed.js" onload="loaded = true"
onerror="errored = false"></script> |
| 31 <script> |
| 32 |
| 33 test(() => { |
| 34 assert_false(executed); |
| 35 assert_false(loaded); |
| 36 assert_false(errored); |
| 37 }, 'A synchronously loaded external classic script with nomodule content attribu
te must not run'); |
| 38 |
| 39 |
| 40 waitForLoadEvent = new Promise((resolve) => { |
| 41 window.onload = resolve; |
| 42 }); |
| 43 |
| 44 </script> |
| 45 </body> |
| 46 </html> |
| OLD | NEW |