Skip to content

Commit fda4e05

Browse files
committed
Adapt to color handling change in core.
1 parent 1411e1e commit fda4e05

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ public void getColor() throws CSSPropertyValueException {
163163
assertNotNull(style);
164164
CSSTypedValue color = (CSSTypedValue) style.getPropertyCSSValue("color");
165165
assertEquals("navy", color.getStringValue());
166-
assertEquals("#000080", color.getRGBColorValue().toString());
167-
assertEquals(128, ((CSSTypedValue) color.getRGBColorValue().getBlue()).getFloatValue(CSSUnit.CSS_NUMBER),
166+
assertEquals("#000080", color.toRGBColorValue().toString());
167+
assertEquals(128, ((CSSTypedValue) color.toRGBColorValue().getBlue()).getFloatValue(CSSUnit.CSS_NUMBER),
168168
0.001f);
169-
assertEquals(0, ((CSSTypedValue) color.getRGBColorValue().getRed()).getFloatValue(CSSUnit.CSS_NUMBER), 0.001f);
170-
assertEquals(0, ((CSSTypedValue) color.getRGBColorValue().getGreen()).getFloatValue(CSSUnit.CSS_NUMBER),
169+
assertEquals(0, ((CSSTypedValue) color.toRGBColorValue().getRed()).getFloatValue(CSSUnit.CSS_NUMBER), 0.001f);
170+
assertEquals(0, ((CSSTypedValue) color.toRGBColorValue().getGreen()).getFloatValue(CSSUnit.CSS_NUMBER),
171171
0.001f);
172172
pList.clear();
173173
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public void testComputedStyleAttr() {
359359
style = elm.getComputedStyle(null);
360360
marginLeft = (CSSTypedValue) style.getPropertyCSSValue("margin-left");
361361
// Currentcolor
362-
assertEquals(CSSValue.Type.RGBCOLOR, marginLeft.getPrimitiveType());
362+
assertEquals(CSSValue.Type.COLOR, marginLeft.getPrimitiveType());
363363
assertFalse(xhtmlDoc.getErrorHandler().hasComputedStyleErrors());
364364
assertFalse(xhtmlDoc.getErrorHandler().hasErrors());
365365
assertTrue(xhtmlDoc.getErrorHandler().hasWarnings());

0 commit comments

Comments
 (0)