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 00d728f1310273a14b57678ac4ac35fbbc571969..1581620eacfbfc67b0858972c7bbdc3e4208ec01 100644 |
--- a/LayoutTests/fast/dom/characterdata-api-arguments.html |
+++ b/LayoutTests/fast/dom/characterdata-api-arguments.html |
@@ -1,7 +1,7 @@ |
<!DOCTYPE html> |
<html> |
<head> |
-<link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#interface-characterdata" /> |
+<link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#interface-characterdata"> |
<script src="../js/resources/js-test-pre.js"></script> |
</head> |
<body> |
@@ -70,7 +70,10 @@ shouldBeEqualToString("text.data", "aaaa"); |
// substringData() |
text.data = "abcdefg"; |
shouldBeEqualToString("text.substringData(4, 3)", "efg"); |
+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 |
shouldBeEqualToString("text.substringData(-4294967294, 3)", "cde"); // Wraps to 2, which is a valid offset. |