Skip to content

Commit

Permalink
Update bridge test after 4898da4
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Aug 22, 2024
1 parent d19f8c0 commit 97f19c2
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ public void testConvertColorFunction() {
assertEquals(.7f, comp[2]);
assertEquals(255, color.getAlpha());

assertNull(context.getColorSpace());
}

@Test
public void testConvertColorFunctionP3() {
Color color = convertPaint(CSSConstants.CSS_FILL_PROPERTY, "color(display-p3 0.02 0.9 0.7)",
ColorValue.CS_DISPLAY_P3);
assertNotNull(color);
float[] comp = new float[3];
color.getColorComponents(comp);
assertEquals(.02f, comp[0]);
assertEquals(.9f, comp[1]);
assertEquals(.7f, comp[2]);
assertEquals(255, color.getAlpha());

assertSame(CSSColorSpaces.getDisplayP3(), context.getColorSpace());
}

Expand Down

0 comments on commit 97f19c2

Please sign in to comment.