Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: LayoutTests/fast/events/uievent-with-inputdevice.html

Issue 1160753005: Implement UIEvent.sourceDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | LayoutTests/fast/events/uievent-with-inputdevice-expected.txt » ('j') | Source/core/events/UIEvent.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698