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/svg/dom/script-tests/SVGAnimatedNumber.js

Issue 930053002: Apply TypeChecking=Unrestricted to SVG{Number,Length,Transform,Angle} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « LayoutTests/svg/dom/script-tests/SVGAngle.js ('k') | LayoutTests/svg/dom/script-tests/SVGLength.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/dom/script-tests/SVGAnimatedNumber.js
diff --git a/LayoutTests/svg/dom/script-tests/SVGAnimatedNumber.js b/LayoutTests/svg/dom/script-tests/SVGAnimatedNumber.js
index 2066ab9f6c7a1ff52d91c356e76496ea9efb87ba..df19566c44f8ff1bde66a608b750114655554703 100644
--- a/LayoutTests/svg/dom/script-tests/SVGAnimatedNumber.js
+++ b/LayoutTests/svg/dom/script-tests/SVGAnimatedNumber.js
@@ -20,11 +20,15 @@ debug("Check assigning various valid and invalid values");
shouldBe("feSpecularLightingElement.surfaceScale.baseVal = -1", "-1"); // Negative values are allowed from SVG DOM, but should lead to an error when rendering (disable the filter)
shouldBe("feSpecularLightingElement.surfaceScale.baseVal = 300", "300");
// ECMA-262, 9.3, "ToNumber"
-shouldBe("feSpecularLightingElement.surfaceScale.baseVal = 'aString'", "'aString'");
-shouldBe("feSpecularLightingElement.surfaceScale.baseVal", "NaN");
+shouldThrow("feSpecularLightingElement.surfaceScale.baseVal = 'aString'");
+shouldBe("feSpecularLightingElement.surfaceScale.baseVal", "300");
shouldBe("feSpecularLightingElement.surfaceScale.baseVal = 0", "0");
-shouldBe("feSpecularLightingElement.surfaceScale.baseVal = feSpecularLightingElement", "feSpecularLightingElement");
-shouldBe("feSpecularLightingElement.surfaceScale.baseVal", "NaN");
+shouldThrow("feSpecularLightingElement.surfaceScale.baseVal = NaN");
+shouldBe("feSpecularLightingElement.surfaceScale.baseVal", "0");
+shouldThrow("feSpecularLightingElement.surfaceScale.baseVal = Infinity");
+shouldBe("feSpecularLightingElement.surfaceScale.baseVal", "0");
+shouldThrow("feSpecularLightingElement.surfaceScale.baseVal = feSpecularLightingElement");
+shouldBe("feSpecularLightingElement.surfaceScale.baseVal", "0");
shouldBe("feSpecularLightingElement.surfaceScale.baseVal = 300", "300");
debug("");
« no previous file with comments | « LayoutTests/svg/dom/script-tests/SVGAngle.js ('k') | LayoutTests/svg/dom/script-tests/SVGLength.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698