blob: 2260c161202dc747a48d95ffac66bb0a5d7c248b [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#wrap {
position: relative;
width: 400px;
height: 200px;
border: 2px solid black;
}
#outer {
position: absolute;
width:200px;
height:200px;
background-color:grey;
}
#inner {
width: 100px;
height: 100px;
background-color:green;
position: fixed;
}
#outer p {
margin-left: 110px;
}
</style>
</head>
<body>
<div id='wrap'>
<div id='outer'>
<div>
<div id='inner'></div>
<p>Foo</p>
</div>
</div>
</div>
<div id="output">Failure</div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
}
function measure() {
var output = document.getElementById("output");
if (document.getElementById('inner').offsetLeft == 210) {
output.innerHTML = "Success"
}
}
document.getElementById('outer').style.left = '200px';
measure();
</script>
</body>
</html>