OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <body> | |
3 <div onclick="console.log('clicked')">DOM wrappers should not leak across world
boundaries via onevent attributes</div> | |
4 <script> | |
5 testRunner.dumpAsText(); | |
6 document.onload = document; | |
7 testRunner.evaluateScriptInIsolatedWorld(1, | |
8 'if (document.onload === null) {' + | |
9 ' console.log("PASS: Main world object not visible in isolated world");'
+ | |
10 '} else {' + | |
11 ' console.log("FAIL: Main world object visible in isolated world!");' + | |
12 '}' + | |
13 'document.onload = document;' + | |
14 'if (document.onload === document) {' + | |
15 ' console.log("PASS: Got back isolated world wrapper");' + | |
16 '} else {' + | |
17 ' console.log("FAIL! Got back:");' + | |
18 ' console.log(document.onload);' + | |
19 '}' + | |
20 'if (document.querySelector("div").onclick === null) {' + | |
21 ' console.log("PASS: Declarative onclick handler did not leak to the isol
ated world");' + | |
22 '} else {' + | |
23 ' console.log("FAIL: onclick handler leaked to isolated world");' + | |
24 '}' | |
25 ); | |
26 if (document.onload === document) { | |
27 console.log("PASS: Got back main world wrapper"); | |
28 } else { | |
29 console.log("FAIL! Got back:"); | |
30 console.log(document.onload); | |
31 } | |
32 </script> | |
33 </body> | |
OLD | NEW |