3 <script src=
"resources/link-highlight-helper.js"></script>
4 <body onload=
"runTest();">
6 <template id=
"shadow-tree">
7 <a href=
"" id=
"targetLink" style=
"-webkit-tap-highlight-color: rgb(0, 255, 0)"><content></content></a>
10 <div id=
"host" style=
"transform: translateZ(0); padding: 20px;">
11 <img width=
"320" height=
"240" src=
"resources/dice.png">
16 var shadowRoot
= document
.querySelector('#host').createShadowRoot();
17 shadowRoot
.appendChild(document
.importNode(document
.querySelector('#shadow-tree').content
, true));
18 var targetLink
= shadowRoot
.querySelector('#targetLink');
21 var clientRect
= targetLink
.getBoundingClientRect();
22 x
= (clientRect
.left
+ clientRect
.right
) / 2;
23 y
= (clientRect
.top
+ clientRect
.bottom
) / 2;
24 if (window
.testRunner
) {
25 testRunner
.dumpAsTextWithPixelResults();
26 testRunner
.waitUntilDone();
29 if (window
.eventSender
) {
30 eventSender
.gestureShowPress(x
, y
);
31 window
.setTimeout(function() { window
.testRunner
.notifyDone(); }, 0);
33 debug("This test requires DumpRenderTree.");
34 debug("This test is successful if the image below is covered in a green box with square ranges.");