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

Unified Diff: LayoutTests/css3/blending/script-tests/background-blend-mode-property-parsing.js

Issue 684293004: Don't require getPropertyCSSValue in css3 tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/css3/blending/script-tests/background-blend-mode-property-parsing.js
diff --git a/LayoutTests/css3/blending/script-tests/background-blend-mode-property-parsing.js b/LayoutTests/css3/blending/script-tests/background-blend-mode-property-parsing.js
index 82af5ab6ae93fdcf05f78907534ffa325cd3da76..dfc645cf7d827a330de18ce0f79c3d4d33076f3a 100644
--- a/LayoutTests/css3/blending/script-tests/background-blend-mode-property-parsing.js
+++ b/LayoutTests/css3/blending/script-tests/background-blend-mode-property-parsing.js
@@ -1,24 +1,5 @@
description("Test the parsing of the background-blend-mode property.");
-function jsWrapperClass(node)
-{
- if (!node)
- return "[null]";
- var string = Object.prototype.toString.apply(node);
- return string.substr(8, string.length - 9);
-}
-
-function shouldBeType(expression, className, prototypeName, constructorName)
-{
- if (!prototypeName)
- prototypeName = "Object";
- if (!constructorName)
- constructorName = "Function";
- shouldBe("jsWrapperClass(" + expression + ")", "'" + className + "'");
- shouldBe("jsWrapperClass(" + expression + ".__proto__)", "'" + prototypeName + "'");
- shouldBe("jsWrapperClass(" + expression + ".constructor)", "'" + constructorName + "'");
-}
-
// These have to be global for the test helpers to see them.
var stylesheet, cssRule, declaration, blendModeRule, subRule;
var styleElement = document.createElement("style");
@@ -38,12 +19,6 @@ function testBlendModeRule(description, rule, expectedLength, expectedValue, exp
declaration = cssRule.style;
shouldBe("declaration.length", "1");
shouldBe("declaration.getPropertyValue('background-blend-mode')", "'" + expectedValue + "'");
-
- blendModeRule = declaration.getPropertyCSSValue('background-blend-mode');
- if(rule.indexOf(',') == -1)
- shouldBeType("blendModeRule", "CSSPrimitiveValue");
- else
- shouldBeType("blendModeRule", "CSSValueList");
}
var blendmodes = ["normal", "multiply, screen", "screen, hue", "overlay, normal", "darken, lighten, normal, luminosity", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];

Powered by Google App Engine
This is Rietveld 408576698