<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Tests that the border-width shorthand is computed properly.")
var testContainer = document.createElement("div");
testContainer.contentEditable = true;
document.body.appendChild(testContainer);
testContainer.innerHTML = '<div id="test" style="border-width: 10px 5px 4px 3px; border-style: solid solid;">hello</div>';
e = document.getElementById('test');
computedStyle = window.getComputedStyle(e, null);
shouldBe("computedStyle.getPropertyValue('border-width')", "'10px 5px 4px 3px'");
e.style.borderWidth="20em 10em 4em 5em";
shouldBe("computedStyle.getPropertyValue('border-width')", "'320px 160px 64px 80px'");
e.style.borderWidth=""
e.style.borderStyle=""
e.style.borderTop = "10px solid"
shouldBe("computedStyle.getPropertyValue('border-width')", "'10px 0px 0px'");
e.style.borderTop=""
e.style.borderWidth="10px 5px 4px 3px"
e.style.borderStyle="none";
shouldBe("computedStyle.getPropertyValue('border-width')", "'0px'");
e.style.borderStyle="hidden";
shouldBe("computedStyle.getPropertyValue('border-width')", "'0px'");
document.body.removeChild(testContainer);
</script>
</body>
</html>