<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>clip computed style</title>
<style type="text/css">
div { height: 5em; width: 10em; font-size:12px }
</style>
<script>
function log(message) {
var console = document.getElementById("console");
console.appendChild(document.createTextNode(message + "\n"));
}
function runTest() {
if (window.testRunner)
testRunner.dumpAsText();
var div = document.getElementById("clip");
if (getComputedStyle(div,'').getPropertyValue("clip") != "rect(5px, 24px, 1px, 12px)") {
log("FAILED");
return;
}
div = document.getElementById("clip2");
if (getComputedStyle(div,'').getPropertyValue("clip") != "auto") {
log("FAILED");
return;
}
log("PASSED");
}
</script>
</head>
<body onload="runTest()">
<div id="clip" style="clip: rect(5px, 2em, 1px, 1em)" ></div>
<div id="clip2" style="clip: auto" ></div>
<div id="console"></div>
</body>
</html>