| OLD | NEW |
| 1 description("Tests the properties of the SVGException object.") | 1 description("Tests the properties of the SVGException object.") |
| 2 | 2 |
| 3 var e; | 3 var e; |
| 4 try { | 4 try { |
| 5 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/
svg", "svg", null); | 5 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/
svg", "svg", null); |
| 6 var matrix = svgDoc.documentElement.createSVGMatrix(); | 6 var matrix = svgDoc.documentElement.createSVGMatrix(); |
| 7 matrix.rotateFromVector(0, 0) | 7 matrix.rotateFromVector(0, 0) |
| 8 // raises a SVG_INVALID_VALUE_ERR | 8 // raises a SVG_INVALID_VALUE_ERR |
| 9 } catch (err) { | 9 } catch (err) { |
| 10 e = err; | 10 e = err; |
| 11 } | 11 } |
| 12 | 12 |
| 13 shouldBeEqualToString("e.toString()", "Error: SVG_INVALID_VALUE_ERR: DOM SVG Exc
eption 1"); | 13 shouldBeEqualToString("e.toString()", "SVG_INVALID_VALUE_ERR: An invalid value w
as passed to an operation or assigned to an attribute."); |
| 14 shouldBeEqualToString("Object.prototype.toString.call(e)", "[object SVGException
]"); | 14 shouldBeEqualToString("Object.prototype.toString.call(e)", "[object SVGException
]"); |
| 15 shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object SV
GExceptionPrototype]"); | 15 shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object SV
GExceptionPrototype]"); |
| 16 shouldBeEqualToString("e.constructor.toString()", "function SVGException() { [na
tive code] }"); | 16 shouldBeEqualToString("e.constructor.toString()", "function SVGException() { [na
tive code] }"); |
| 17 shouldBe("e.constructor", "window.SVGException"); | 17 shouldBe("e.constructor", "window.SVGException"); |
| 18 shouldBe("e.SVG_WRONG_TYPE_ERR", "e.constructor.SVG_WRONG_TYPE_ERR"); | 18 shouldBe("e.SVG_WRONG_TYPE_ERR", "e.constructor.SVG_WRONG_TYPE_ERR"); |
| 19 shouldBe("e.SVG_WRONG_TYPE_ERR", "0"); | 19 shouldBe("e.SVG_WRONG_TYPE_ERR", "0"); |
| 20 shouldBe("e.SVG_INVALID_VALUE_ERR", "e.constructor.SVG_INVALID_VALUE_ERR"); | 20 shouldBe("e.SVG_INVALID_VALUE_ERR", "e.constructor.SVG_INVALID_VALUE_ERR"); |
| 21 shouldBe("e.SVG_INVALID_VALUE_ERR", "1"); | 21 shouldBe("e.SVG_INVALID_VALUE_ERR", "1"); |
| 22 shouldBe("e.SVG_MATRIX_NOT_INVERTABLE", "e.constructor.SVG_MATRIX_NOT_INVERTABLE
"); | 22 shouldBe("e.SVG_MATRIX_NOT_INVERTABLE", "e.constructor.SVG_MATRIX_NOT_INVERTABLE
"); |
| 23 shouldBe("e.SVG_MATRIX_NOT_INVERTABLE", "2"); | 23 shouldBe("e.SVG_MATRIX_NOT_INVERTABLE", "2"); |
| 24 | 24 |
| 25 var successfullyParsed = true; | 25 var successfullyParsed = true; |
| OLD | NEW |