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

Side by Side 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: Change unittest 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 <head>
2 <script src="../../resources/js-test.js"></script>
3 </head>
4 <body>
5 <script>
6 description("This tests that all the subclasses of UIEvent will have sourceD evice set to be null by default, and it can also be passed when initialization." )
tdresser 2015/06/01 17:36:46 We aren't actually checking if sourceDevice is set
7
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 }
11
12 var firesTouchEvents = false;
13 document.addEventListener("click", function(event) { firesTouchEvents = eve nt.sourceDevice.firesTouchEvents; } );
14
15 var e = new MouseEvent('click');
16
17 document.dispatchEvent(e);
18
19 shouldBeFalse('firesTouchEvents');
20
21 if (window.internals) {
22 internals.setFiresTouchEvents(e, true);
23 }
24 document.dispatchEvent(e);
25
26 shouldBeTrue('firesTouchEvents');
27
28 </script>
29 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/uievent-with-inputdevice-expected.txt » ('j') | Source/core/events/UIEvent.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698