зеркало из https://github.com/mozilla/pjs.git
Add tests to check case (2) for shorthands in nsCSSDeclaration::GetValue.
This commit is contained in:
Родитель
97d5bc6cec
Коммит
d44ab96269
|
@ -56,6 +56,18 @@ is(style.getPropertyPriority("border-right-style"), "important");
|
|||
isnot(style.getPropertyValue("border-style"), "");
|
||||
is(style.getPropertyPriority("border-style"), "important");
|
||||
|
||||
// Also test that we check consistency of inherit and -moz-initial.
|
||||
element.setAttribute("style", "border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted");
|
||||
isnot(style.getPropertyValue("border-style"), "", "serialize shorthand when all values not inherit/initial");
|
||||
element.setAttribute("style", "border-top-style: inherit; border-right-style: inherit; border-bottom-style: inherit; border-left-style: inherit");
|
||||
is(style.getPropertyValue("border-style"), "inherit", "serialize shorthand as inherit");
|
||||
element.setAttribute("style", "border-top-style: -moz-initial; border-right-style: -moz-initial; border-bottom-style: -moz-initial; border-left-style: -moz-initial");
|
||||
is(style.getPropertyValue("border-style"), "-moz-initial", "serialize shorthand as initial");
|
||||
element.setAttribute("style", "border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: inherit");
|
||||
is(style.getPropertyValue("border-style"), "", "don't serialize shorthand when partly inherit");
|
||||
element.setAttribute("style", "border-top-style: -moz-initial; border-right-style: dotted; border-bottom-style: -moz-initial; border-left-style: -moz-initial");
|
||||
is(style.getPropertyValue("border-style"), "", "don't serialize shorthand when partly initial");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче