Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <head> | |
| 2 <script src="../../resources/js-test.js"></script> | |
| 3 </head> | |
| 4 <body> | |
| 5 <script> | |
| 6 description("This tests that all the subclasses of UIEvent will have sourceD evice.firesTouchEvents set to be false by default, but it can also be passed whe n initialization.") | |
| 7 | |
| 8 if (window.testRunner) { | |
| 9 testRunner.dumpAsText(); | |
| 10 } | |
| 11 | |
| 12 var firesTouchEvents = false; | |
| 13 document.addEventListener("click", function(event) { firesTouchEvents = eve nt.sourceDevice.firesTouchEvents; } ); | |
|
tdresser
2015/06/02 14:43:55
Can you add some newlines here? Something like:
d
| |
| 14 | |
| 15 var e = new MouseEvent('click'); | |
| 16 | |
| 17 document.dispatchEvent(e); | |
| 18 | |
| 19 shouldBeFalse('firesTouchEvents'); | |
| 20 | |
| 21 if (window.internals) { | |
| 22 internals.setFiresTouchEvents(e, true); | |
| 23 } | |
| 24 document.dispatchEvent(e); | |
| 25 | |
| 26 shouldBeTrue('firesTouchEvents'); | |
| 27 | |
| 28 </script> | |
| 29 </body> | |
| OLD | NEW |