blob: 69893740601e0d46863468859d69acfb4321d577 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
</head>
<body onload="runTest();">
<div id="highlight" class="fauxHighlight" style="z-index: 1; position: absolute;"></div>
<div style="top: 10px; left: 10px; will-change: transform;">
<div id="targetDiv" style="position: absolute; left: 50px; top: 50px; width: 50px; height: 50px; box-shadow: 0px 4px 23px 5px rgba(0, 0, 0, 0.2); border-style: solid; border-width: 2px;">
<br><center>Target</center><br>
</div>
</div>
<div style="position: absolute; left: 10px; top: 250px; will-change: transform;">
This test is successful if the box labelled "Target" has a green rectangle centered on it.
</div>
<script>
function runTest() {
var clientRect = document.getElementById('targetDiv').getBoundingClientRect();
var highlight = document.getElementById('highlight');
highlight.style.left = clientRect.left + "px";
highlight.style.top = clientRect.top + "px";
highlight.style.width = clientRect.width + "px";
highlight.style.height = clientRect.height + "px";
}
</script>
</body>
</html>