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

Side by Side Diff: LayoutTests/fast/events/frame-click-focus.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 function log(msg) { 4 function log(msg) {
5 document.getElementById('log').appendChild(document.createTextNode(m sg + '\n')); 5 document.getElementById('log').appendChild(document.createTextNode(m sg + '\n'));
6 } 6 }
7 7
8 function test() { 8 function test() {
9 if (window.testRunner) { 9 if (window.testRunner) {
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
11 } 11 }
12 12
13 window.onfocus = function() { log('main frame focused'); } 13 window.onfocus = function() { log('main frame focused'); }
14 window.onblur = function() { log('main frame blurred'); } 14 window.onblur = function() { log('main frame blurred'); }
15 15
16 var w = document.getElementById('frame').contentWindow; 16 var w = document.getElementById('frame').contentWindow;
17 w.onfocus = function() { log('iframe focused'); } 17 w.onfocus = function() { log('iframe focused'); }
18 w.onblur = function() { log('iframe blurred'); } 18 w.onblur = function() { log('iframe blurred'); }
19 19
20 if (window.eventSender) { 20 if (window.eventSender) {
21 // Mouse events only work after an initial layout
22 document.body.offsetLeft;
21 eventSender.mouseMoveTo(1, 300); 23 eventSender.mouseMoveTo(1, 300);
22 eventSender.mouseDown(); 24 eventSender.mouseDown();
23 eventSender.mouseUp(); 25 eventSender.mouseUp();
24 26
25 // We need to "wait" a bit before the next click -- otherwise it is ignored 27 // We need to "wait" a bit before the next click -- otherwise it is ignored
26 eventSender.leapForward(2000); 28 eventSender.leapForward(2000);
27 29
28 eventSender.mouseMoveTo(50, 50); 30 eventSender.mouseMoveTo(50, 50);
29 eventSender.mouseDown(); 31 eventSender.mouseDown();
30 eventSender.mouseUp(); 32 eventSender.mouseUp();
(...skipping 10 matching lines...) Expand all
41 <body onload="test()"> 43 <body onload="test()">
42 <iframe id="frame" style="width: 100px; height: 100px; margin: 0px; border: 2px solid black;"></iframe> 44 <iframe id="frame" style="width: 100px; height: 100px; margin: 0px; border: 2px solid black;"></iframe>
43 <p>This page tests that frames receive focus events when a click occurs 45 <p>This page tests that frames receive focus events when a click occurs
44 within their content area, and blur events when a click occurs outside 46 within their content area, and blur events when a click occurs outside
45 their content area.</p> 47 their content area.</p>
46 <p>To test, click in the frame and then click on this text.</p> 48 <p>To test, click in the frame and then click on this text.</p>
47 49
48 <pre id="log"></pre> 50 <pre id="log"></pre>
49 </body> 51 </body>
50 </html> 52 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/event-view-toString.html ('k') | LayoutTests/fast/events/mouse-focus-imagemap.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698