Commit 5aab0f4c authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Remove duplicated CSS test

Exact same test is contained in WPT:
wpt/css/cssom/cssom-setProperty-shorthand.html

Change-Id: I930f6b9f1c43200392d7c9d120a5d9e58bd44b32
Reviewed-on: https://chromium-review.googlesource.com/1064065
Commit-Queue: Rob Buis <rbuis@igalia.com>
Reviewed-by: default avatarChris Nardi <cnardi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559511}
parent b3bae025
Tests that shorthand properties can be removed via CSSOM.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS canSetProperty('font') is true
PASS canRemoveProperty('font') is true
PASS canSetProperty('border-top') is true
PASS canRemoveProperty('border-top') is true
PASS canSetProperty('border-right') is true
PASS canRemoveProperty('border-right') is true
PASS canSetProperty('border-bottom') is true
PASS canRemoveProperty('border-bottom') is true
PASS canSetProperty('border-left') is true
PASS canRemoveProperty('border-left') is true
PASS canSetProperty('border') is true
PASS canRemoveProperty('border') is true
PASS canSetProperty('border-color') is true
PASS canRemoveProperty('border-color') is true
PASS canSetProperty('border-style') is true
PASS canRemoveProperty('border-style') is true
PASS canSetProperty('border-width') is true
PASS canRemoveProperty('border-width') is true
PASS canSetProperty('background-position') is true
PASS canRemoveProperty('background-position') is true
PASS canSetProperty('background-repeat') is true
PASS canRemoveProperty('background-repeat') is true
PASS canSetProperty('border-spacing') is true
PASS canRemoveProperty('border-spacing') is true
PASS canSetProperty('list-style') is true
PASS canRemoveProperty('list-style') is true
PASS canSetProperty('margin') is true
PASS canRemoveProperty('margin') is true
PASS canSetProperty('outline') is true
PASS canRemoveProperty('outline') is true
PASS canSetProperty('padding') is true
PASS canRemoveProperty('padding') is true
PASS canSetProperty('background') is true
PASS canRemoveProperty('background') is true
PASS canSetProperty('overflow') is true
PASS canRemoveProperty('overflow') is true
PASS canSetProperty('border-radius') is true
PASS canRemoveProperty('border-radius') is true
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
shorthandProperties = [
"font",
"border-top",
"border-right",
"border-bottom",
"border-left",
"border",
"border-color",
"border-style",
"border-width",
"background-position",
"background-repeat",
"border-spacing",
"list-style",
"margin",
"outline",
"padding",
"background",
"overflow",
"border-radius"
];
element = document.createElement('span');
function canSetProperty(propertyName) {
element.style.setProperty(propertyName, 'initial');
return element.style.getPropertyValue(propertyName) == 'initial';
}
function canRemoveProperty(propertyName) {
element.style.removeProperty(propertyName);
return element.style.getPropertyValue(propertyName) != 'initial';
}
description("Tests that shorthand properties can be removed via CSSOM.");
for (i = 0; i < shorthandProperties.length; ++i) {
var propertyName = shorthandProperties[i];
shouldBe("canSetProperty('" + propertyName + "')", "true");
shouldBe("canRemoveProperty('" + propertyName + "')", "true");
}
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment