Skip to content

Commit af559aa

Browse files
committed
attr() spec changed from '%' to 'percentage' type.
1 parent 85ad076 commit af559aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

junit/io/sf/carte/doc/dom4j/XHTMLDocumentTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ public void testComputedStyleAttr() {
672672
/*
673673
* attr() percentage invalid value type.
674674
*/
675-
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin %)");
676-
assertEquals("margin-left: attr(leftmargin %); ", elm.getOverrideStyle(null).getCssText());
675+
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin percentage)");
676+
assertEquals("margin-left: attr(leftmargin percentage); ", elm.getOverrideStyle(null).getCssText());
677677
style = elm.getComputedStyle(null);
678678
marginLeft = (CSSTypedValue) style.getPropertyCSSValue("margin-left");
679679
// Default fallback
@@ -685,7 +685,7 @@ public void testComputedStyleAttr() {
685685
/*
686686
* attr() percentage invalid value type, fallback.
687687
*/
688-
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin %, 1.2em)");
688+
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin percentage, 1.2em)");
689689
style = elm.getComputedStyle(null);
690690
marginLeft = (CSSTypedValue) style.getPropertyCSSValue("margin-left");
691691
assertEquals(25.92f, marginLeft.getFloatValue(CSSUnit.CSS_PT), 0.01f);
@@ -697,7 +697,7 @@ public void testComputedStyleAttr() {
697697
* attr() percentage value type.
698698
*/
699699
elm.setAttribute("leftmargin", "2");
700-
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin %)");
700+
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin percentage)");
701701
style = elm.getComputedStyle(null);
702702
marginLeft = (CSSTypedValue) style.getPropertyCSSValue("margin-left");
703703
assertEquals(2f, marginLeft.getFloatValue(CSSUnit.CSS_PERCENTAGE), 0.01f);
@@ -708,7 +708,7 @@ public void testComputedStyleAttr() {
708708
* attr() percentage value type (II).
709709
*/
710710
elm.setAttribute("leftmargin", "2%");
711-
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin %)");
711+
elm.getOverrideStyle(null).setCssText("margin-left:attr(leftmargin percentage)");
712712
style = elm.getComputedStyle(null);
713713
marginLeft = (CSSTypedValue) style.getPropertyCSSValue("margin-left");
714714
assertEquals(2f, marginLeft.getFloatValue(CSSUnit.CSS_PERCENTAGE), 0.01f);

0 commit comments

Comments
 (0)