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..a1ba0e841e150b50f75e945044ca5e51cf5ca602 |
--- /dev/null |
+++ b/LayoutTests/fast/events/uievent-with-inputdevice.html |
@@ -0,0 +1,23 @@ |
+<head> |
+<script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<script> |
+ description("This tests that all the subclasses of UIEvent will have sourceDevice set to be null by default, and it can also be passed when initialization.") |
+ |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ var onClickCalled = false; |
+ |
+ var onclick = function(e) { |
Rick Byers
2015/05/28 00:11:43
You should probably make this document.addEventLis
|
+ onClickCalled = true; |
+ }; |
+ |
+ var e = new MouseEvent('click', { clientX: 10, clientY: 20, sourceDevice: new InputDevice({ firesTouchEvents: true })} ); |
+ document.dispatchEvent(e); |
+ |
+ shouldBeFalse('onClickCalled'); |
+ |
+</script> |
+</body> |