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

Unified Diff: LayoutTests/svg/text/svgtextcontentelement-methods-parameters.html

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 7 years, 3 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
Index: LayoutTests/svg/text/svgtextcontentelement-methods-parameters.html
diff --git a/LayoutTests/svg/text/svgtextcontentelement-methods-parameters.html b/LayoutTests/svg/text/svgtextcontentelement-methods-parameters.html
index 45e815dcaf1d557619968621d7f9f75f02f4e053..d3b831146685181a9ce6ea68e859cad76d38c884 100644
--- a/LayoutTests/svg/text/svgtextcontentelement-methods-parameters.html
+++ b/LayoutTests/svg/text/svgtextcontentelement-methods-parameters.html
@@ -40,15 +40,15 @@ function shouldBeEqualToSVGRect(actualRect, expectedRect)
}
// Arguments should be mandatory.
-shouldThrow("svgText.getSubStringLength()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.getSubStringLength(2)", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.getStartPositionOfChar()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.getEndPositionOfChar()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.getExtentOfChar()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.getRotationOfChar()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.getCharNumAtPosition()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.selectSubString()", "'TypeError: Not enough arguments'");
-shouldThrow("svgText.selectSubString(2)", "'TypeError: Not enough arguments'");
+shouldThrow("svgText.getSubStringLength()", '"TypeError: Failed to execute \'getSubStringLength\' on \'SVGTextContentElement\': 2 arguments required, but only 0 present."');
+shouldThrow("svgText.getSubStringLength(2)", '"TypeError: Failed to execute \'getSubStringLength\' on \'SVGTextContentElement\': 2 arguments required, but only 1 present."');
+shouldThrow("svgText.getStartPositionOfChar()", '"TypeError: Failed to execute \'getStartPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 present."');
+shouldThrow("svgText.getEndPositionOfChar()", '"TypeError: Failed to execute \'getEndPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 present."');
+shouldThrow("svgText.getExtentOfChar()", '"TypeError: Failed to execute \'getExtentOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 present."');
+shouldThrow("svgText.getRotationOfChar()", '"TypeError: Failed to execute \'getRotationOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 present."');
+shouldThrow("svgText.getCharNumAtPosition()", '"TypeError: Failed to execute \'getCharNumAtPosition\' on \'SVGTextContentElement\': 1 argument required, but only 0 present."');
+shouldThrow("svgText.selectSubString()", '"TypeError: Failed to execute \'selectSubString\' on \'SVGTextContentElement\': 2 arguments required, but only 0 present."');
+shouldThrow("svgText.selectSubString(2)", '"TypeError: Failed to execute \'selectSubString\' on \'SVGTextContentElement\': 2 arguments required, but only 1 present."');
// Should throw an IndexSizeError if charnum is greater than or equal to the number of characters at this node.
shouldThrow("svgText.getSubStringLength(999, 2)", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'");

Powered by Google App Engine
This is Rietveld 408576698