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

Unified Diff: LayoutTests/svg/animations/resources/SVGAnimationTestCase.js

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/animations/resources/SVGAnimationTestCase.js
diff --git a/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js b/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
index 2634c5c1d1fa73863e14b1eb0914182bc6bd39ac..3d944397161147507c47e12a40a527414d95e4e6 100644
--- a/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
+++ b/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
@@ -46,16 +46,17 @@ function expectTranslationMatrix(actualMatrix, expectedE, expectedF, tolerance)
function expectColor(element, red, green, blue, property) {
if (typeof property != "string")
- color = getComputedStyle(element).getPropertyCSSValue("color").getRGBColorValue();
- else {
- fillPaint = getComputedStyle(element).getPropertyCSSValue(property);
- color = getComputedStyle(element).getPropertyCSSValue(property).rgbColor;
- }
+ color = getComputedStyle(element).getPropertyValue("color");
+ else
+ color = getComputedStyle(element).getPropertyValue(property);
+
+ var re = new RegExp("rgba?\\(([^, ]*), ([^, ]*), ([^, ]*)(?:, )?([^, ]*)\\)");
+ colorComponents = re.exec(color);
// Allow a tolerance of 1 for color values, as they are integers.
- shouldBeCloseEnough("color.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "" + red, 1);
- shouldBeCloseEnough("color.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "" + green, 1);
- shouldBeCloseEnough("color.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "" + blue, 1);
+ shouldBeCloseEnough("colorComponents[1]", "" + red, 1);
+ shouldBeCloseEnough("colorComponents[2]", "" + green, 1);
+ shouldBeCloseEnough("colorComponents[3]", "" + blue, 1);
}
function expectFillColor(element, red, green, blue) {

Powered by Google App Engine
This is Rietveld 408576698