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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-2.html
diff --git a/LayoutTests/compositing/gestures/gesture-tapHighlight-img.html b/LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-2.html
similarity index 60%
copy from LayoutTests/compositing/gestures/gesture-tapHighlight-img.html
copy to LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-2.html
index 5b73d41bdf3f9cfc05b65f7f652a2cccbeac6d58..c35f902a3c988412e8f4f673f31126e058017f71 100644
--- a/LayoutTests/compositing/gestures/gesture-tapHighlight-img.html
+++ b/LayoutTests/compositing/gestures/gesture-tapHighlight-img-and-text-2.html
@@ -1,15 +1,17 @@
<!DOCTYPE html>
<html>
<head>
-<script src="../../resources/js-test.js"></script>
+<title>This test ensures all elements are highlighted in a multielement <a> when the image is clicked</title>
</head>
<body onload="runTest();">
<div style="-webkit-transform: translateZ(0); padding: 20px;">
-<a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)"><img width="320" height="240" src="resources/dice.png"></a>
+<a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)">
+ <font id="beforeTarget">Before Text</font><img id="imgTarget" width="320" height="240" src="resources/dice.png"><font id="afterTarget">After Text</font>
+</a>
</div>
<script>
function runTest() {
- var clientRect = document.getElementById('targetLink').getBoundingClientRect();
+ var clientRect = document.getElementById('imgTarget').getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2;
if (window.testRunner) {
@@ -22,7 +24,7 @@ function runTest() {
window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
} else {
debug("This test requires DumpRenderTree.");
- debug("This test is successful if the image below is covered in a green rectangle with rounded corners.");
+ debug("This test is successful if the image and text below is covered in a green rectangle.");
}
}
</script>

Powered by Google App Engine
This is Rietveld 408576698