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

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

Issue 21675003: CharacterData.substringData() arguments should be mandatory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify link tag Created 7 years, 5 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/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.

Powered by Google App Engine
This is Rietveld 408576698