| Index: LayoutTests/compositing/gestures/gesture-tapHighlight-shadow-tree.html
|
| diff --git a/LayoutTests/compositing/gestures/gesture-tapHighlight-img.html b/LayoutTests/compositing/gestures/gesture-tapHighlight-shadow-tree.html
|
| similarity index 52%
|
| copy from LayoutTests/compositing/gestures/gesture-tapHighlight-img.html
|
| copy to LayoutTests/compositing/gestures/gesture-tapHighlight-shadow-tree.html
|
| index 04fa3dd42678d9ec327b274d6b5b02c761243eb7..f9e2f410d594ddaa8143bb69348b1a44b409590d 100644
|
| --- a/LayoutTests/compositing/gestures/gesture-tapHighlight-img.html
|
| +++ b/LayoutTests/compositing/gestures/gesture-tapHighlight-shadow-tree.html
|
| @@ -1,17 +1,24 @@
|
| <!DOCTYPE html>
|
| <html>
|
| -<head>
|
| <script src="resources/link-highlight-helper.js"></script>
|
| -<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
|
| -</head>
|
| <body onload="runTest();">
|
| -<div style="-webkit-transform: translateZ(0); padding: 20px;">
|
| -<a href="" id="targetLink" class="opaqueHighlight"><img width="320" height="240" src="resources/dice.png"></a>
|
| +
|
| +<template id="shadow-tree">
|
| +<a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)"><content></content></a>
|
| +</template>
|
| +
|
| +<div id="host" style="-webkit-transform: translateZ(0); padding: 20px;">
|
| +<img width="320" height="240" src="resources/dice.png">
|
| </div>
|
| +
|
| <script>
|
| +useMockHighlight();
|
| +var shadowRoot = document.querySelector('#host').createShadowRoot();
|
| +shadowRoot.appendChild(document.importNode(document.querySelector('#shadow-tree').content, true));
|
| +var targetLink = shadowRoot.querySelector('#targetLink');
|
| +
|
| function runTest() {
|
| - useMockHighlight();
|
| - var clientRect = document.getElementById('targetLink').getBoundingClientRect();
|
| + var clientRect = targetLink.getBoundingClientRect();
|
| x = (clientRect.left + clientRect.right) / 2;
|
| y = (clientRect.top + clientRect.bottom) / 2;
|
| if (window.testRunner) {
|
| @@ -24,10 +31,9 @@ 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.");
|
| + debug("This test is successful if the image below is covered in a green box with square ranges.");
|
| }
|
| }
|
| </script>
|
| -</script>
|
| </body>
|
| </html>
|
|
|