OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipa
ge/webappapis.html#eventhandler"> | 3 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipa
ge/webappapis.html#eventhandler"> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <div id="div"></div> | 7 <div id="div"></div> |
8 <script> | 8 <script> |
9 description("This test checks that EventHandler attributes only accept JS functi
ons as input."); | 9 description("This test checks that EventHandler attributes only accept JS functi
ons as input."); |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 shouldBeNull('div.onkeydown'); | 36 shouldBeNull('div.onkeydown'); |
37 dispatchKeyEvent(); | 37 dispatchKeyEvent(); |
38 shouldBe('callbackCount', '1'); | 38 shouldBe('callbackCount', '1'); |
39 | 39 |
40 // Test null assignment. | 40 // Test null assignment. |
41 shouldNotThrow('div.onkeydown = callback'); | 41 shouldNotThrow('div.onkeydown = callback'); |
42 shouldBe('div.onkeydown', 'callback'); | 42 shouldBe('div.onkeydown', 'callback'); |
43 shouldNotThrow('div.onkeydown = null'); | 43 shouldNotThrow('div.onkeydown = null'); |
44 shouldBeNull('div.onkeydown'); | 44 shouldBeNull('div.onkeydown'); |
45 </script> | 45 </script> |
46 <script src="../js/resources/js-test-post.js"></script> | |
47 </body> | 46 </body> |
48 </html> | 47 </html> |
OLD | NEW |