Index: LayoutTests/svg/dom/script-tests/SVGAngle.js |
diff --git a/LayoutTests/svg/dom/script-tests/SVGAngle.js b/LayoutTests/svg/dom/script-tests/SVGAngle.js |
index 2ad104c0bad0cf894e49f96dce63a436ce332ade..295f87f51f7965dae440ee6abdcbe002487f5f5e 100644 |
--- a/LayoutTests/svg/dom/script-tests/SVGAngle.js |
+++ b/LayoutTests/svg/dom/script-tests/SVGAngle.js |
@@ -59,13 +59,17 @@ shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN, 50)"); |
shouldThrow("angle.newValueSpecifiedUnits(-1, 50)"); |
shouldThrow("angle.newValueSpecifiedUnits(5, 50)"); |
shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG)"); |
-shouldBeUndefined("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 'aString')"); |
-shouldBe("angle.value", "NaN"); |
+shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 'aString')"); |
+shouldBe("angle.value", "0"); |
shouldBeUndefined("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 0)"); |
-shouldBeUndefined("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, angle)"); |
-shouldBe("angle.value", "NaN"); |
-shouldBeUndefined("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, svgElement)"); |
-shouldBe("angle.value", "NaN"); |
+shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, angle)"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, svgElement)"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, NaN)"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, Infinity)"); |
+shouldBe("angle.value", "0"); |
shouldThrow("angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG)"); |
// All of the following unitType arguments convert to 0 (SVG_ANGLETYPE_UNKNOWN). |
shouldThrow("angle.newValueSpecifiedUnits('aString', 4)"); |
@@ -143,29 +147,37 @@ shouldBe("angle.unitType", "SVGAngle.SVG_ANGLETYPE_UNSPECIFIED"); |
debug(""); |
debug("Check setting invalid 'valueInSpecifiedUnits' arguments"); |
-shouldBe("angle.valueInSpecifiedUnits = 'test'", "'test'"); |
-shouldBe("angle.value", "NaN"); |
-shouldBe("angle.valueInSpecifiedUnits", "NaN"); |
+shouldThrow("angle.valueInSpecifiedUnits = 'test'"); |
+shouldBe("angle.value", "0"); |
+shouldBe("angle.valueInSpecifiedUnits", "0"); |
shouldBe("angle.unitType", "SVGAngle.SVG_ANGLETYPE_UNSPECIFIED"); |
shouldBe("angle.valueInSpecifiedUnits = 0", "0"); |
-shouldBe("angle.valueInSpecifiedUnits = angle", "angle"); |
-shouldBe("angle.value", "NaN"); |
-shouldBe("angle.valueInSpecifiedUnits", "NaN"); |
+shouldThrow("angle.valueInSpecifiedUnits = angle"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.valueInSpecifiedUnits = NaN"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.valueInSpecifiedUnits = Infinity"); |
+shouldBe("angle.value", "0"); |
+shouldBe("angle.valueInSpecifiedUnits", "0"); |
shouldBe("angle.unitType", "SVGAngle.SVG_ANGLETYPE_UNSPECIFIED"); |
debug(""); |
debug("Check setting invalid 'value' arguments"); |
shouldBe("angle.value = 0", "0"); |
-shouldBe("angle.value = 'test'", "'test'"); |
-shouldBe("angle.value", "NaN"); |
-shouldBe("angle.valueInSpecifiedUnits", "NaN"); |
+shouldThrow("angle.value = 'test'"); |
+shouldBe("angle.value", "0"); |
+shouldBe("angle.valueInSpecifiedUnits", "0"); |
shouldBe("angle.unitType", "SVGAngle.SVG_ANGLETYPE_UNSPECIFIED"); |
shouldBe("angle.value = 0", "0"); |
-shouldBe("angle.value = angle", "angle"); |
-shouldBe("angle.value", "NaN"); |
-shouldBe("angle.valueInSpecifiedUnits", "NaN"); |
+shouldThrow("angle.value = angle"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.value = NaN"); |
+shouldBe("angle.value", "0"); |
+shouldThrow("angle.value = Infinity"); |
+shouldBe("angle.value", "0"); |
+shouldBe("angle.valueInSpecifiedUnits", "0"); |
shouldBe("angle.unitType", "SVGAngle.SVG_ANGLETYPE_UNSPECIFIED"); |
debug(""); |