mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1462442 [wpt PR 11047] - Add !important case to cssom-setProperty-shorthand.html, a=testonly
Automatic update from web-platform-testsAdd !important case to cssom-setProperty-shorthand.html (#11047) Add !important case to cssom-setProperty-shorthand.html to make sure the property is removed regardless [1]. [1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty Change-Id: Ia68d224fb78a13f51bfeda02860932d56b1a0fba -- wpt-commits: 2eca7cd9484fc2096859418c729889876129e636 wpt-pr: 11047
This commit is contained in:
parent
3c875f0992
commit
89920b718e
@ -543875,7 +543875,7 @@
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/cssom-setProperty-shorthand.html": [
|
||||
"14c752e5dbeab2d58983d53aceab08519379bf0f",
|
||||
"905be9c1bbbaceea752ea0577ce475cc246ae49d",
|
||||
"testharness"
|
||||
],
|
||||
"css/cssom/cssstyledeclaration-csstext-final-delimiter.html": [
|
||||
|
@ -42,8 +42,8 @@
|
||||
|
||||
element = document.createElement('span');
|
||||
|
||||
function canSetProperty(propertyName) {
|
||||
element.style.setProperty(propertyName, 'initial');
|
||||
function canSetProperty(propertyName, priority) {
|
||||
element.style.setProperty(propertyName, 'initial', priority);
|
||||
return element.style.getPropertyValue(propertyName) == 'initial';
|
||||
}
|
||||
|
||||
@ -56,13 +56,21 @@
|
||||
var propertyName = shorthandProperties[i];
|
||||
|
||||
test(function(){
|
||||
assert_true(canSetProperty(propertyName), 'can setPropertyValue with shorthand');
|
||||
assert_true(canSetProperty(propertyName, ''), 'can setPropertyValue with shorthand');
|
||||
}, 'shorthand ' + propertyName + ' can be set with setProperty');
|
||||
|
||||
test(function(){
|
||||
assert_true(canRemoveProperty(propertyName), 'can setPropertyValue with shorthand');
|
||||
}, 'shorthand ' + propertyName + ' can be removed with removeProperty');
|
||||
|
||||
test(function(){
|
||||
assert_true(canSetProperty(propertyName, 'important'), 'can setPropertyValue with shorthand');
|
||||
}, 'shorthand ' + propertyName + ' can be set with setProperty and priority !important');
|
||||
|
||||
test(function(){
|
||||
assert_true(canRemoveProperty(propertyName), 'can setPropertyValue with shorthand');
|
||||
}, 'shorthand ' + propertyName + ' can be removed with removeProperty even when set with !important');
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user