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

Side by Side Diff: LayoutTests/fast/images/image-map-multiple.html

Issue 15508003: Revert "Don't force layout for mouse event hit tests" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 <script> 1 <script>
2 2
3 var test = 1; 3 var test = 1;
4 var map1; 4 var map1;
5 var map2; 5 var map2;
6 var map3; 6 var map3;
7 7
8 function setResult(result) 8 function setResult(result)
9 { 9 {
10 var message = "FAIL: Unexpected result: " + result; 10 var message = "FAIL: Unexpected result: " + result;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 map1 = document.getElementsByTagName("map")[0]; 53 map1 = document.getElementsByTagName("map")[0];
54 map2 = document.getElementsByTagName("map")[1]; 54 map2 = document.getElementsByTagName("map")[1];
55 map3 = document.getElementsByTagName("map")[2]; 55 map3 = document.getElementsByTagName("map")[2];
56 56
57 var numClicks = 7; 57 var numClicks = 7;
58 if (!window.eventSender) { 58 if (!window.eventSender) {
59 document.getElementById("log").textContent = "To run the test manually, click " + numClicks + " times in the image rectangle.\n"; 59 document.getElementById("log").textContent = "To run the test manually, click " + numClicks + " times in the image rectangle.\n";
60 return; 60 return;
61 } 61 }
62 testRunner.dumpAsText(); 62 testRunner.dumpAsText();
63 // Mouse events only work after an initial layout
64 document.body.offsetLeft;
65 eventSender.mouseMoveTo(50, 50); 63 eventSender.mouseMoveTo(50, 50);
66 for (var click = 0; click < numClicks; ++click) { 64 for (var click = 0; click < numClicks; ++click) {
67 eventSender.mouseDown(); 65 eventSender.mouseDown();
68 eventSender.mouseUp(); 66 eventSender.mouseUp();
69 } 67 }
70 } 68 }
71 69
72 </script> 70 </script>
73 <body onload="runTest()"> 71 <body onload="runTest()">
74 <map name="mapName"><area shape=rect coords="0,0,100,100" onclick="setResult('1' )"></map> 72 <map name="mapName"><area shape=rect coords="0,0,100,100" onclick="setResult('1' )"></map>
75 <map name="mapname"><area shape=rect coords="0,0,100,100" onclick="setResult('2' )"></map> 73 <map name="mapname"><area shape=rect coords="0,0,100,100" onclick="setResult('2' )"></map>
76 <map name="mapname"><area shape=rect coords="0,0,100,100" onclick="setResult('3' )"></map> 74 <map name="mapname"><area shape=rect coords="0,0,100,100" onclick="setResult('3' )"></map>
77 <img src="resources/green.jpg" border=20 width=100 height=100 usemap="#mapname" ismap onclick="setResult('img')"> 75 <img src="resources/green.jpg" border=20 width=100 height=100 usemap="#mapname" ismap onclick="setResult('img')">
78 <div>This tests image map behavior when there are multiple maps with the same na me.</div> 76 <div>This tests image map behavior when there are multiple maps with the same na me.</div>
79 <pre id="log"></pre> 77 <pre id="log"></pre>
80 </body> 78 </body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/html/details-remove-summary-6-and-click.html ('k') | LayoutTests/fast/images/image-map-multiple-xhtml.xhtml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698