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

Side by Side Diff: LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-2.html

Issue 129643002: Fix link highlights on links that contain images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <title>This test ensures all elements are highlighted in a multielement <a> when the image is clicked</title>
5 </head> 5 </head>
6 <body onload="runTest();"> 6 <body onload="runTest();">
7 <div style="-webkit-transform: translateZ(0); padding: 20px;"> 7 <div style="-webkit-transform: translateZ(0); padding: 20px;">
8 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)">< img width="320" height="240" src="resources/dice.png"></a> 8 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)">
9 <font id="beforeTarget">Before Text</font><img id="imgTarget" width="320" he ight="240" src="resources/dice.png"><font id="afterTarget">After Text</font>
10 </a>
9 </div> 11 </div>
10 <script> 12 <script>
11 function runTest() { 13 function runTest() {
12 var clientRect = document.getElementById('targetLink').getBoundingClientRect (); 14 var clientRect = document.getElementById('imgTarget').getBoundingClientRect( );
13 x = (clientRect.left + clientRect.right) / 2; 15 x = (clientRect.left + clientRect.right) / 2;
14 y = (clientRect.top + clientRect.bottom) / 2; 16 y = (clientRect.top + clientRect.bottom) / 2;
15 if (window.testRunner) { 17 if (window.testRunner) {
16 testRunner.dumpAsTextWithPixelResults(); 18 testRunner.dumpAsTextWithPixelResults();
17 testRunner.waitUntilDone(); 19 testRunner.waitUntilDone();
18 } 20 }
19 21
20 if (window.eventSender) { 22 if (window.eventSender) {
21 eventSender.gestureShowPress(x, y); 23 eventSender.gestureShowPress(x, y);
22 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); 24 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
23 } else { 25 } else {
24 debug("This test requires DumpRenderTree."); 26 debug("This test requires DumpRenderTree.");
25 debug("This test is successful if the image below is covered in a green rectangle with rounded corners."); 27 debug("This test is successful if the image and text below is covered in a green rectangle.");
26 } 28 }
27 } 29 }
28 </script> 30 </script>
29 </script> 31 </script>
30 </body> 32 </body>
31 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698