blob: cc8ef92eac23e21e076d4d8f0fee1e05ddf3bcb0 [file] [log] [blame]
<body>
<div id="box">
</div>
<div id="results">
</div>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.dumpAsText();
var style = document.getElementById('box').style;
style.left = "10px";
checkResult("style.left", "10px");
style.left = "20px";
checkResult("style.left", "20px");
function checkResult(property, expectedValue) {
var value = eval(property);
var result = ": " + property + " was " + value + ", expected " + expectedValue + "<br>";
if (value == expectedValue)
result = "<b style=\"color:green\">PASS</b>" + result;
else
result = "<b style=\"color:red\">FAIL</b>" + result;
var results = document.getElementById('results');
results.innerHTML += result;
}
</script>
</body>