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

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

Issue 22798002: Make SVGTextContentElement methods behave consistently with Firefox and IE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 7 years, 4 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 var svgNS = "http://www.w3.org/2000/svg"; 1 var svgNS = "http://www.w3.org/2000/svg";
2 2
3 var svgRoot = document.createElementNS(svgNS, "svg"); 3 var svgRoot = document.createElementNS(svgNS, "svg");
4 document.documentElement.appendChild(svgRoot); 4 document.documentElement.appendChild(svgRoot);
5 5
6 var svgText = document.createElementNS(svgNS, "text"); 6 var svgText = document.createElementNS(svgNS, "text");
7 svgText.style.fontFamily = "Ahem"; 7 svgText.style.fontFamily = "Ahem";
8 svgText.style.fontSize = "20px"; 8 svgText.style.fontSize = "20px";
9 svgText.appendChild(document.createTextNode("abc")); 9 svgText.appendChild(document.createTextNode("abc"));
10 svgRoot.appendChild(svgText); 10 svgRoot.appendChild(svgText);
11 11
12 shouldThrow("svgText.selectSubString(-1, 0)"); 12 shouldThrow("svgText.selectSubString(-1, 0)", "'IndexSizeError: Index or size wa s negative, or greater than the allowed value.'");
13 shouldThrow("svgText.getSubStringLength(0, -1)"); 13 shouldNotThrow("svgText.getSubStringLength(0, -1)");
14 shouldThrow("svgText.getSubStringLength(3, 0)"); 14 shouldThrow("svgText.getSubStringLength(3, 0)", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'");
15 15
16 // cleanup 16 // cleanup
17 document.documentElement.removeChild(svgRoot); 17 document.documentElement.removeChild(svgRoot);
18 18
19 var successfullyParsed = true; 19 var successfullyParsed = true;
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/script-tests/getSubStringLength.js ('k') | LayoutTests/svg/custom/selectSubString-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698