Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Side by Side Diff: LayoutTests/fast/dom/event-attrs-isolated-world.html

Issue 22687002: Treat non-callable input as null for EventHandler attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698