chromium/third_party/blink/web_tests/fast/css/shorthand-setProperty-important.html

<!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");
shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");

e.style.borderBottomStyle = "";
e.style.setProperty("border-bottom-style", "solid", "very important");
shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
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");
shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");

e.style.borderBottomStyle = "";
e.style.setProperty("border-bottom-style", "solid", "undefined");
shouldBeEqualToString("e.style.getPropertyValue('border-bottom-style')", "");
shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");

e.style.borderBottomStyle = "";
e.style.setProperty("border-bottom-style", "solid", undefined);
shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'");
shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");

document.body.removeChild(testContainer);
</script>
</body>
</html>