blob: 09b9ef3bc5ee150db1b052cc617045ae079e9f94 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="element-1" style="background:url() 100% 100% repeat-y; padding-top: 0px;"></div>
<div id="element-2" style="background:url() 100% 100% repeat-y; list-style:square outside url();"></div>
<script>
description("This test verifies the property implicit flag is reset after adding any css property.");
var element1 = document.getElementById("element-1");
var element2 = document.getElementById("element-2");
shouldBe("element1.style.isPropertyImplicit('padding-top')", "false");
var allProperties = element2.style.cssText.concat(" ").split("; ");
element2.style.removeProperty("list-style");
var remainingProperties = element2.style.cssText.concat(" ").split("; ");
var removedProperties = [];
for (i in allProperties) {
if (remainingProperties.indexOf(allProperties[i]) < 0)
removedProperties.push(allProperties[i].replace(/\:.*/,""));
}
shouldBe("removedProperties.length", "1");
shouldBeEqualToString("removedProperties[0]", "list-style");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>