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

Side by Side Diff: LayoutTests/fast/events/capture-on-target.html

Issue 14859016: Don't force layout for mouse event hit tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix review comment Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 4
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 testRunner.waitUntilDone(); 7 testRunner.waitUntilDone();
8 } 8 }
9 function test() 9 function test()
10 { 10 {
11 document.getElementById("target").addEventListener("click", targetClick, tru e); 11 document.getElementById("target").addEventListener("click", targetClick, tru e);
12 12
13 if (window.eventSender) { 13 if (window.eventSender) {
14 // Mouse events only work after an initial layout
15 document.body.offsetLeft;
14 eventSender.mouseMoveTo(52, 52); 16 eventSender.mouseMoveTo(52, 52);
15 eventSender.mouseDown(); 17 eventSender.mouseDown();
16 eventSender.mouseUp(); 18 eventSender.mouseUp();
17 window.setTimeout(finish, 0); 19 window.setTimeout(finish, 0);
18 } 20 }
19 } 21 }
20 22
21 var finished = false; 23 var finished = false;
22 function finish() 24 function finish()
23 { 25 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 <body onload="test()"> 61 <body onload="test()">
60 62
61 <p>This tests checks that capturing event handlers trigger on the node that is the target of the event, and that stopPropagation in such a handler prevents further bubble handlers from triggering.</p> 63 <p>This tests checks that capturing event handlers trigger on the node that is the target of the event, and that stopPropagation in such a handler prevents further bubble handlers from triggering.</p>
62 <div onclick="containerClick(event)"> 64 <div onclick="containerClick(event)">
63 <div style="position:absolute; top: 40; left: 40; width: 100; height: 40 ; background-color: pink" id="target" onclick="targetClick(event)">Click here</a > 65 <div style="position:absolute; top: 40; left: 40; width: 100; height: 40 ; background-color: pink" id="target" onclick="targetClick(event)">Click here</a >
64 </div> 66 </div>
65 67
66 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div> 68 <div id="result" style="position: absolute; top: 100; left: 50;"><br></div>
67 </body> 69 </body>
68 </html> 70 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/replaced-image-map.html ('k') | LayoutTests/fast/events/clientXY-in-zoom-and-scroll.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698