Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: LayoutTests/svg/css/rect-system-color.xhtml

Issue 114373004: Remove the SVGColor and SVGPaint DOM interfaces (were deprecated). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: text diff fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/svg/css/rect-system-color.xhtml
diff --git a/LayoutTests/svg/css/rect-system-color.xhtml b/LayoutTests/svg/css/rect-system-color.xhtml
index a89ae545233d95bf912f9f8705926b94f9d1179a..3cfd702f00ec4b762b09324905e4e2525464e031 100644
--- a/LayoutTests/svg/css/rect-system-color.xhtml
+++ b/LayoutTests/svg/css/rect-system-color.xhtml
@@ -17,7 +17,10 @@ function checkSystemColor(id1, id2, systemColor)
var divElement = document.getElementById(id2);
var computedStyleDiv = divElement.ownerDocument.defaultView.getComputedStyle(divElement);
- color1 = computedStyleText.getPropertyCSSValue('fill').rgbColor;
+ color1 = computedStyleText.getPropertyValue('fill');
+ var re = new RegExp("rgba?\\(([^, ]*), ([^, ]*), ([^, ]*)(?:, )?([^, ]*)\\)");
+ color1Components = re.exec(color1);
+
color2 = computedStyleDiv.getPropertyCSSValue('color').getRGBColorValue();
systemColorRed = color2.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
@@ -26,15 +29,16 @@ function checkSystemColor(id1, id2, systemColor)
debug('Testing system color' + systemColor);
- shouldBe("color1.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "systemColorRed");
- shouldBe("color1.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "systemColorGreen");
- shouldBe("color1.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "systemColorBlue");
+ shouldBe("parseInt(color1Components[1])", "systemColorRed");
+ shouldBe("parseInt(color1Components[2])", "systemColorGreen");
+ shouldBe("parseInt(color1Components[3])", "systemColorBlue");
- color1 = computedStyleText.getPropertyCSSValue('stroke').rgbColor;
+ color1 = computedStyleText.getPropertyValue('stroke');
+ color1Components = re.exec(color1);
- shouldBe("color1.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "systemColorRed");
- shouldBe("color1.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "systemColorGreen");
- shouldBe("color1.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "systemColorBlue");
+ shouldBe("parseInt(color1Components[1])", "systemColorRed");
+ shouldBe("parseInt(color1Components[2])", "systemColorGreen");
+ shouldBe("parseInt(color1Components[3])", "systemColorBlue");
}
description('Test that fill and stroke properties accept system colors');
« no previous file with comments | « LayoutTests/svg/css/getComputedStyle-basic-expected.txt ('k') | LayoutTests/svg/css/rect-system-color-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698