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

Side by Side 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: Create a new init function 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <script src="../../resources/js-test.js"></script>
3 <script type="text/javascript">
4 description('Test that synthetic mouse events from touch events should have a so urceDevice and its firesTouchEvents should be true.');
5
6 function mouseHandler(event) {
7 debug(event.type);
8 shouldBeNonNull("event.sourceDevice");
9 shouldBeTrue("event.sourceDevice.firesTouchEvents");
10 }
11
12 if (window.eventSender) {
13
14 document.addEventListener("mousedown", mouseHandler);
15 document.addEventListener("mousemove", mouseHandler);
16 document.addEventListener("mouseup", mouseHandler);
Rick Byers 2015/06/23 00:55:57 nit: please add a 'click' handler too. You can do
lanwei 2015/06/23 22:19:20 Done.
17
18 debug('Sending gestureTap which synthesizes mousemove, mousedown and mouseup ');
19 eventSender.gestureTap(10, 10);
20
21 } else {
22 debug('This test requires eventSender.');
23 }
24
25 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698