Index: LayoutTests/fast/css/shorthand-setProperty-important.html |
diff --git a/LayoutTests/fast/css/shorthand-setProperty-important.html b/LayoutTests/fast/css/shorthand-setProperty-important.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4864486911d4dc5102860b8df426fd28b6106e86 |
--- /dev/null |
+++ b/LayoutTests/fast/css/shorthand-setProperty-important.html |
@@ -0,0 +1,43 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<meta charset="utf-8"> |
+<script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<script> |
+ |
+description("Verify that the priority parameter is a case-insensitive match to 'important' or the empty string."); |
+ |
+var testContainer = document.createElement("div"); |
+document.body.appendChild(testContainer); |
+ |
+testContainer.innerHTML = '<div id="test">hello</div>'; |
+ |
+e = document.getElementById('test'); |
+ |
+// Test "important" strictness |
+e.style.borderBottomStyle = ""; |
+e.style.setProperty("border-bottom-style", "solid", "!important"); |
+shouldBe("e.style.getPropertyValue('border-bottom-style')", "null"); |
+shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''"); |
+ |
+e.style.borderBottomStyle = ""; |
+e.style.setProperty("border-bottom-style", "solid", "very important"); |
+shouldBe("e.style.getPropertyValue('border-bottom-style')", "null"); |
+shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''"); |
+ |
+e.style.borderBottomStyle = ""; |
+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.setProperty("border-bottom-style", "solid", "random"); |
+shouldBe("e.style.getPropertyValue('border-bottom-style')", "null"); |
+shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''"); |
+ |
+document.body.removeChild(testContainer); |
+</script> |
+</body> |
+</html> |