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

Side by Side Diff: LayoutTests/fast/dom/exception-getting-event-handler.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
1 <html> 1 <html>
2 <body onload="loaded()"> 2 <body onload="loaded()">
3 <p>This test checks that an exception thrown when getting the 3 <p>This test checks that an exception thrown when getting the
4 handleEvent property of an event listener does not crash.</p> 4 handleEvent property of an event listener does not crash.</p>
5 <hr> 5 <hr>
6 <script> 6 <script>
7 if (window.testRunner) 7 if (window.testRunner)
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 9
10 function loaded() { 10 function loaded() {
11 var o = {}; 11 var o = {};
12 o.__defineGetter__("handleEvent", function() { throw 42; }); 12 o.__defineGetter__("handleEvent", function() { throw 42; });
13 var div = document.getElementById("div"); 13 var div = document.getElementById("div");
14 div.onkeydown = o; 14 div.addEventListener('keydown', o);
15 var event = document.createEvent("KeyboardEvent"); 15 var event = document.createEvent("KeyboardEvent");
16 event.initKeyboardEvent("keydown", true, true, null, "Enter", ""); 16 event.initKeyboardEvent("keydown", true, true, null, "Enter", "");
17 div.dispatchEvent(event); 17 div.dispatchEvent(event);
18 } 18 }
19 </script> 19 </script>
20 <div id="div">PASS: You didn't crash.</div> 20 <div id="div">PASS: You didn't crash.</div>
21 </body> 21 </body>
22 </html> 22 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698