blob: 6566eb56f767b0009fec4efd042f060c66539d92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<!DOCTYPE html>
<html>
<body onload="runTest();">
<div style="position: relative; left: 10px; top: 40px">
<a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0.5)">Target Link.</a>
</div>
<!-- For this test to work, must put the translateZ(0) on a div other than the one containing the
highlighted link. This will force the highlight into the non-composited content host, which
may survive the navigation. -->
<div style="position: relative; left: 10px; top: 70px; transform: translateZ(0);">
This test is not successful if this message appears.
</div>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
function runTest() {
var clientRect = document.getElementById('targetLink').getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2;
if (window.testRunner)
testRunner.waitUntilDone();
if (window.eventSender) {
eventSender.gestureShowPress(x, y);
// Force display of highlight before navigating to second page.
runAfterLayoutAndPaint(function() {
window.location = 'resources/gesture-tapHighlight-simple-navigate-destination.html';
runAfterLayoutAndPaint(function() {
testRunner.notifyDone();
});
});
} else {
debug("This test requires DumpRenderTree.");
}
}
</script>
</body>
</html>
|