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

Side by Side Diff: LayoutTests/svg/custom/script-tests/SVGException.js

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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;
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/polyline-points-crash-expected.txt ('k') | LayoutTests/svg/custom/selectSubString-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698