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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/wheelevent-in-text-node.html

Issue 2261173005: wheel layout tests moved to fast/events/wheel folder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
7
8 function test() {
9 var div = document.querySelector('div');
10 if (window.eventSender) {
11 eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5);
12 eventSender.mouseScrollBy(0,120);
13 } else {
14 debug("FAIL: This test requires window.eventSender.");
15 finishJSTest();
16 }
17 }
18
19 function wheelHandler(e) {
20 window.theEvent = e;
21
22 debug("'Real' MouseWheel events should not be dispatched on the text node, but instead on its parent.");
23 shouldBeEqualToString('theEvent.target.nodeName', 'DIV');
24 finishJSTest();
25 }
26
27 window.onload = function () {
28 var div = document.querySelector('div');
29 div.addEventListener('mousewheel', wheelHandler);
30 test();
31 };
32 </script>
33 </head>
34 <body>
35 <div>This is a div containing text. Wheel events originating on the text
36 node should target the div.</div>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698