blob: 8adb308c401d41ceb5dfb0326a43596f602e0fa8 (
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
38
39
40
41
42
43
44
45
46
47
|
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="resources/link-highlight-helper.js"></script>
<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
<style>
.myDiv {
transform:translateZ(0);
position:relative;
z-index:0;
top:-10px;
background-color:blue
}
</style>
</head>
<body onload="runTest();" style="overflow: hidden">
<span style="cursor: pointer; position:relative;z-index:1" class="opaqueHighlight">
<span id="targetLink" style="visibility: hidden">TEST</span>
</span>
<div class="myDiv">Div to overlap to ensure compositing</div>
<script>
function runTest() {
useMockHighlight();
var clientRect = document.getElementById('targetLink').getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2;
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
testRunner.waitUntilDone();
}
if (window.eventSender) {
eventSender.gestureShowPress(x, y);
window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
} else {
debug("This test requires DumpRenderTree.");
debug("This test makes sure that a link highlight on a composited" +
", inline element that doesn't draw content does not crash" +
"http://crbug.com/322591");
debug("This test is successful if it doesn't crash and there's a green rectangle below.");
}
}
</script>
</body>
</html>
|