Update web-platform-tests to revision 2b7dace05fc1869398ee24f84fda4c0e4c0455ae

This commit is contained in:
WPT Sync Bot 2018-08-31 21:37:12 +00:00 committed by Tom Servo
parent b23125d590
commit 6c901de216
844 changed files with 19802 additions and 3093 deletions

View file

@ -1,6 +1,5 @@
<!DOCTYPE html>
<title>NoModificationAllowedError when mutating read only properties</title>
<link rel="author" title="Anders Hartvoll Ruud" href="andruud@chromium.org">
<link rel="help" href="https://www.w3.org/TR/cssom-1/#dom-cssstyledeclaration-setpropertyvalue">
<meta name="assert" content="This test verifies that NoModificationAllowedError is thrown when mutating read only properties" />
<script src="/resources/testharness.js"></script>

View file

@ -58,6 +58,20 @@
assert_equals(testElem.style.margin, "20px");
assert_equals(testElem.style.cssText, "margin: 20px;")
}, "Shorthand serialization after setting");
test(function() {
const testElem = document.getElementById("test");
testElem.style.cssText = "margin: initial;";
assert_equals(testElem.style.margin, "initial");
assert_equals(testElem.style.cssText, "margin: initial;");
}, "Shorthand serialization with 'initial' value.");
test(function() {
const testElem = document.getElementById("test");
testElem.style.setProperty("margin-top", "initial", "important");
assert_equals(testElem.style.margin, "");
assert_equals(testElem.style.cssText, "margin-top: initial !important; margin-right: initial; margin-bottom: initial; margin-left: initial;");
}, "Shorthand serialization with 'initial' value, one longhand with important flag.");
</script>
</body>
</html>