blob: 3edd255e878c44ba2597acf8ae8b2a15a85fe36f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script src="resources/link-highlight-helper.js"></script>
</head>
<body onLoad="runTest();">
<iframe id="targetFrame" src="resources/1-frame-noncomposited.html" style="position: relative; left: 10px; top: 10px; width: 400px; height: 150px;"></iframe>
<div style="position: relative; left: 10px; top: 20px; will-change: transform;">
This test is successful if "Target Link" is covered by a green box with square corners,
and the frame is partially scrolled.
</div>
<script>
function runTest() {
useMockHighlight();
var targetFrame = document.getElementById("targetFrame");
var clientRect = targetFrame.contentDocument.getElementById('targetLink').getBoundingClientRect();
x = (clientRect.left + clientRect.right) / 2;
y = (clientRect.top + clientRect.bottom) / 2 + targetFrame.getBoundingClientRect().top;
if (window.testRunner)
testRunner.waitUntilDone();
if (window.eventSender && window.testRunner) {
eventSender.gestureShowPress(x, y);
runAfterLayoutAndPaint(function() {
document.getElementById("targetFrame").contentDocument.getElementById('divToControlCompositing').style.willChange = "transform";
runAfterLayoutAndPaint(function() {
document.getElementById("targetFrame").contentWindow.scrollTo(0, 20);
testRunner.notifyDone();
});
});
} else {
debug("This test requires DumpRenderTree.");
}
}
</script>
</body>
</html>