OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head></head> | 3 <head></head> |
4 <body> | 4 <body> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../js/resources/js-test-pre.js"></script> |
6 <form> | 6 <form> |
7 <input type="hidden" name="arguments"></input> | 7 <input type="hidden" name="arguments"></input> |
8 <div onclick="onclicked()" id="divInsideForm"></div> | 8 <div onclick="onclicked()" id="divInsideForm"></div> |
9 </form> | 9 </form> |
10 </body> | 10 </body> |
11 <script> | 11 <script> |
12 var clicked = false; | 12 var clicked = false; |
13 | 13 |
14 function onclicked() { | 14 function onclicked() { |
15 clicked = true; | 15 clicked = true; |
16 } | 16 } |
17 | 17 |
18 var event = document.createEvent("MouseEvents"); | 18 var event = document.createEvent("MouseEvents"); |
19 event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, f
alse, false, 0, null); | 19 event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, f
alse, false, 0, null); |
20 var div = document.getElementById("divInsideForm"); | 20 var div = document.getElementById("divInsideForm"); |
21 div.dispatchEvent(event); | 21 div.dispatchEvent(event); |
22 | 22 |
23 shouldBeTrue('clicked'); | 23 shouldBeTrue('clicked'); |
24 | 24 |
25 var successfullyParsed = true; | 25 var successfullyParsed = true; |
26 </script> | 26 </script> |
27 <script src="../js/resources/js-test-post.js"></script> | 27 <script src="../js/resources/js-test-post.js"></script> |
28 </html> | 28 </html> |
OLD | NEW |