Chromium Code Reviews| Index: LayoutTests/fast/events/uievent-with-inputdevice.html |
| diff --git a/LayoutTests/fast/events/uievent-with-inputdevice.html b/LayoutTests/fast/events/uievent-with-inputdevice.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a9e9f5f72c2ce734e68b43ffff5984ac488de92f |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/uievent-with-inputdevice.html |
| @@ -0,0 +1,29 @@ |
| +<head> |
| +<script src="../../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| + description("This tests that all the subclasses of UIEvent will have sourceDevice.firesTouchEvents set to be false by default, but it can also be passed when initialization.") |
| + |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + } |
| + |
| + var firesTouchEvents = false; |
| + document.addEventListener("click", function(event) { firesTouchEvents = event.sourceDevice.firesTouchEvents; } ); |
|
tdresser
2015/06/02 14:43:55
Can you add some newlines here? Something like:
d
|
| + |
| + var e = new MouseEvent('click'); |
| + |
| + document.dispatchEvent(e); |
| + |
| + shouldBeFalse('firesTouchEvents'); |
| + |
| + if (window.internals) { |
| + internals.setFiresTouchEvents(e, true); |
| + } |
| + document.dispatchEvent(e); |
| + |
| + shouldBeTrue('firesTouchEvents'); |
| + |
| +</script> |
| +</body> |