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) { | |
14 firesTouchEvents = event.sourceDevice.firesTouchEvents; | |
Rick Byers
2015/06/04 14:52:35
sourceDevice is actually supposed to be null here
tdresser
2015/06/04 15:34:24
Oops, thanks Rick.
I caught that here(https://cod
| |
15 }); | |
16 | |
17 var e = new MouseEvent('click'); | |
18 | |
19 document.dispatchEvent(e); | |
20 | |
21 shouldBeFalse('firesTouchEvents'); | |
Rick Byers
2015/06/04 14:52:35
nit: move this shouldBe into the event handler its
| |
22 | |
23 if (window.internals) { | |
24 internals.setFiresTouchEvents(e, true); | |
Rick Byers
2015/06/04 14:52:35
I don't think this internals API is worth the cost
| |
25 } | |
26 document.dispatchEvent(e); | |
27 | |
28 shouldBeTrue('firesTouchEvents'); | |
29 | |
30 </script> | |
31 </body> | |
OLD | NEW |