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

Unified Diff: LayoutTests/fast/dom/characterdata-api-arguments.html

Issue 24199003: Improve exception messages for Source/core/dom/CharacterData.cpp (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline. 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/characterdata-api-arguments-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/characterdata-api-arguments.html
diff --git a/LayoutTests/fast/dom/characterdata-api-arguments.html b/LayoutTests/fast/dom/characterdata-api-arguments.html
index 1581620eacfbfc67b0858972c7bbdc3e4208ec01..221512af34de82f6f5cf94d6386f416d672390d1 100644
--- a/LayoutTests/fast/dom/characterdata-api-arguments.html
+++ b/LayoutTests/fast/dom/characterdata-api-arguments.html
@@ -26,7 +26,7 @@ shouldThrow("text.insertData()", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.data", "abcdefg");
shouldThrow("text.insertData(0)", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.data", "abcdefg");
-shouldThrow("text.insertData(999, 'test')", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'"); // offset greater than length.
+shouldThrow("text.insertData(999, 'test')", '"IndexSizeError: Failed to execute \'insertData\' on \'CharacterData\': The offset 999 is greater than the node\'s length (7)."');
shouldBeEqualToString("text.data", "abcdefg");
shouldNotThrow("text.insertData(-4294967294, 'test')"); // Wraps to 2, which is a valid offset.
shouldBeEqualToString("text.data", "abtestcdefg");
@@ -39,9 +39,9 @@ shouldThrow("text.deleteData()", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.data", "abcd");
shouldThrow("text.deleteData(0)", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.data", "abcd");
-shouldThrow("text.deleteData(999, 3)", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'"); // offset greater than length.
+shouldThrow("text.deleteData(999, 3)", '"IndexSizeError: Failed to execute \'deleteData\' on \'CharacterData\': The offset 999 is greater than the node\'s length (4)."');
shouldBeEqualToString("text.data", "abcd");
-shouldThrow("text.deleteData(-1, 3)", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'"); // Wraps to 4294967295 which is greater than the data length
+shouldThrow("text.deleteData(-1, 3)", '"IndexSizeError: Failed to execute \'deleteData\' on \'CharacterData\': The offset 4294967295 is greater than the node\'s length (4)."'); // Wraps to 4294967295 which is greater than the data length
shouldBeEqualToString("text.data", "abcd");
shouldNotThrow("text.deleteData(-4294967294, 2)"); // Wraps to 2, which is a valid offset.
shouldBeEqualToString("text.data", "ab");
@@ -58,9 +58,9 @@ shouldThrow("text.replaceData(0)", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.data", "abcdefg");
shouldThrow("text.replaceData(0, 0)", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.data", "abcdefg");
-shouldThrow("text.replaceData(999, 3, 'test')", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'"); // offset greater than length.
+shouldThrow("text.replaceData(999, 3, 'test')", '"IndexSizeError: Failed to execute \'replaceData\' on \'CharacterData\': The offset 999 is greater than the node\'s length (7)."');
shouldBeEqualToString("text.data", "abcdefg");
-shouldThrow("text.replaceData(-1, 3, 'test')", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'"); // Wraps to 4294967295 which is greater than the data length
+shouldThrow("text.replaceData(-1, 3, 'test')", '"IndexSizeError: Failed to execute \'replaceData\' on \'CharacterData\': The offset 4294967295 is greater than the node\'s length (7)."'); // Wraps to 4294967295 which is greater than the data length
shouldBeEqualToString("text.data", "abcdefg");
shouldNotThrow("text.replaceData(-4294967294, 0, 'test')"); // Wraps to 2, which is a valid offset.
shouldBeEqualToString("text.data", "abtestcdefg");
@@ -74,7 +74,7 @@ shouldThrow("text.substringData()", "'TypeError: Not enough arguments'");
shouldThrow("text.substringData(0)", "'TypeError: Not enough arguments'");
shouldBeEqualToString("text.substringData(4, 999)", "efg"); // Length argument is too large, should be adjusted.
shouldBeEqualToString("text.substringData(4, -1)", "efg"); // Length argument is too large (after wrapping), should be adjusted.
-shouldThrow("text.substringData(-1, 2)", "'IndexSizeError: Index or size was negative, or greater than the allowed value.'"); // Wraps to 4294967295 which is greater than the data length
+shouldThrow("text.substringData(-1, 2)", '"IndexSizeError: Failed to execute \'substringData\' on \'CharacterData\': The offset 4294967295 is greater than the node\'s length (7)."'); // Wraps to 4294967295 which is greater than the data length
shouldBeEqualToString("text.substringData(-4294967294, 3)", "cde"); // Wraps to 2, which is a valid offset.
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/characterdata-api-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698