blob: 2560c8374f9d02f43350d4b47fbc845850330225 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests that querying the priority for a shorthand works.");
var testContainer = document.createElement("div");
document.body.appendChild(testContainer);
testContainer.innerHTML = '<div id="test">hello</div>';
e = document.getElementById('test');
// Sanity check.
e.style.setProperty("border-bottom-style", "solid", "important");
shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'");
shouldBe("e.style.getPropertyPriority('border-bottom-style')", "'important'");
e.style.borderBottomStyle = "";
e.style.border = "20px solid green";
shouldBe("e.style.getPropertyValue('border')", "'20px solid green'");
shouldBe("e.style.getPropertyPriority('border')", "''");
e.style.border = "";
e.style.setProperty("border", "20px solid green", "important");
shouldBe("e.style.getPropertyValue('border')", "'20px solid green'");
shouldBe("e.style.getPropertyPriority('border')", "'important'");
document.body.removeChild(testContainer);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>