<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Tests that the border-color shorthand is computed properly.")
var testContainer = document.createElement("div");
testContainer.contentEditable = true;
document.body.appendChild(testContainer);
testContainer.innerHTML = '<div id="test">hello</div>';
e = document.getElementById('test');
computedStyle = window.getComputedStyle(e, null);
e.style.borderColor = "red blue green white";
shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(255, 0, 0) rgb(0, 0, 255) rgb(0, 128, 0) rgb(255, 255, 255)'");
e.style.borderColor = "black";
shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(0, 0, 0)'");
e.style.borderColor = "rgb(102, 102, 102)";
shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(102, 102, 102)'");
e.style.borderColor = "";
e.style.color = "black";
e.style.border = "solid";
shouldBe("computedStyle.getPropertyValue('border-color')", "'rgb(0, 0, 0)'");
document.body.removeChild(testContainer);
</script>
</body>
</html>