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

Unified Diff: LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add initinternal Created 5 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html
diff --git a/LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html b/LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html
new file mode 100644
index 0000000000000000000000000000000000000000..6672384baa648b85f5c9630b15ad3f2a9c191ddf
--- /dev/null
+++ b/LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<script src="../../resources/js-test.js"></script>
+<script type="text/javascript">
+description('Test that synthetic mouse events from touch events should have a sourceDevice and its firesTouchEvents should be true.');
+
+function mouseHandler(event) {
+ debug(event.type);
+ shouldBeNonNull("event.sourceDevice");
+ shouldBeTrue("event.sourceDevice.firesTouchEvents");
+}
+
+if (window.eventSender) {
+ for (var evt of ['mousemove', 'mousedown', 'mouseup', 'click']) {
+ document.addEventListener(evt, mouseHandler);
+ }
+
+ debug('Sending gestureTap which synthesizes mousemove, mousedown, mouseup and click');
+ eventSender.gestureTap(10, 10);
+
+} else {
+ debug('This test requires eventSender.');
+}
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/events/mouse-event-from-touch-source-device-event-sender-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698