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 set to be null by default, and it can also be passed when initialization." ) | |
|
tdresser
2015/06/01 17:36:46
We aren't actually checking if sourceDevice is set
| |
| 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; } ); | |
| 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 |