OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../js/resources/js-test-pre.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 | 4 |
5 description('Tests the name of the event parameter for inline event attributes')
; | 5 description('Tests the name of the event parameter for inline event attributes')
; |
6 | 6 |
7 function dispatchClick(element) | 7 function dispatchClick(element) |
8 { | 8 { |
9 var clickEvent = document.createEvent('MouseEvent'); | 9 var clickEvent = document.createEvent('MouseEvent'); |
10 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false
, false, false, false, 0, null); | 10 clickEvent.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false
, false, false, false, 0, null); |
11 element.dispatchEvent(clickEvent); | 11 element.dispatchEvent(clickEvent); |
12 } | 12 } |
(...skipping 16 matching lines...) Expand all Loading... |
29 // Clear out window.event so that we get the local event and not the global even
t. | 29 // Clear out window.event so that we get the local event and not the global even
t. |
30 svg.setAttribute('onclick', 'window.event = undefined; type = typeof event'); | 30 svg.setAttribute('onclick', 'window.event = undefined; type = typeof event'); |
31 dispatchClick(svg); | 31 dispatchClick(svg); |
32 shouldBeEqualToString('type', 'undefined') | 32 shouldBeEqualToString('type', 'undefined') |
33 | 33 |
34 svg.setAttribute('onclick', 'type = typeof evt'); | 34 svg.setAttribute('onclick', 'type = typeof evt'); |
35 dispatchClick(svg); | 35 dispatchClick(svg); |
36 shouldBeEqualToString('type', 'object') | 36 shouldBeEqualToString('type', 'object') |
37 | 37 |
38 </script> | 38 </script> |
OLD | NEW |