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

Unified Diff: LayoutTests/fast/js/resources/select-options-remove.js

Issue 291563004: Overload resolution: ignore extra arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline Created 6 years, 7 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/js/resources/select-options-remove.js
diff --git a/LayoutTests/fast/js/resources/select-options-remove.js b/LayoutTests/fast/js/resources/select-options-remove.js
index 609695a36b511529619e57057c401109490b64d8..61c0d7c187d1aaff07a034da7b9f4ced45b33af3 100644
--- a/LayoutTests/fast/js/resources/select-options-remove.js
+++ b/LayoutTests/fast/js/resources/select-options-remove.js
@@ -67,13 +67,13 @@ shouldBe("select1.selectedIndex", "-1");
debug("");
debug("1.10 Remove no args from empty Options");
-shouldThrow("select1.options.remove()", '"TypeError: Failed to execute \'remove\' on \'HTMLOptionsCollection\': 1 argument required, but only 0 present."');
+shouldThrow("select1.options.remove()");
shouldBe("select1.options.length", "0");
shouldBe("select1.selectedIndex", "-1");
debug("");
debug("1.11 Remove too many args from empty Options");
-shouldThrow("select1.options.remove(0, 'foo')");
+shouldBe("select1.options.remove(0, 'foo')", "undefined");
shouldBe("select1.options.length", "0");
shouldBe("select1.selectedIndex", "-1");
debug("");
@@ -194,45 +194,45 @@ shouldBe("select2.options[0].value", "'K'");
debug("");
debug("2.11 Remove no args from non-empty Options");
-shouldThrow("select2.options.remove()", '"TypeError: Failed to execute \'remove\' on \'HTMLOptionsCollection\': 1 argument required, but only 0 present."');
+shouldThrow("select2.options.remove()");
shouldBe("select2.options.length", "6");
shouldBe("select2.selectedIndex", "4");
shouldBe("select2.options[0].value", "'K'");
debug("");
debug("2.12 Remove too many args from non-empty Options");
-shouldThrow("select2.options.remove(0, 'foo')");
-shouldBe("select2.options.length", "6");
-shouldBe("select2.selectedIndex", "4");
-shouldBe("select2.options[0].value", "'K'");
+shouldBe("select2.options.remove(0, 'foo')", "undefined");
+shouldBe("select2.options.length", "5");
+shouldBe("select2.selectedIndex", "3");
+shouldBe("select2.options[0].value", "'L'");
debug("");
debug("2.13 Remove invalid index -2 from non-empty Options");
shouldBe("select2.options.remove(-2)", "undefined");
-shouldBe("select2.options.length", "6");
-shouldBe("select2.selectedIndex", "4");
-shouldBe("select2.options[2].value", "'M'");
+shouldBe("select2.options.length", "5");
+shouldBe("select2.selectedIndex", "3");
+shouldBe("select2.options[2].value", "'N'");
debug("");
debug("2.14 Remove invalid index -1 from non-empty Options");
shouldBe("select2.options.remove(-1)", "undefined");
-shouldBe("select2.options.length", "6");
-shouldBe("select2.selectedIndex", "4");
-shouldBe("select2.options[3].value", "'N'");
+shouldBe("select2.options.length", "5");
+shouldBe("select2.selectedIndex", "3");
+shouldBe("select2.options[3].value", "'O'");
debug("");
debug("2.15 Remove index 0 from non-empty Options");
shouldBe("select2.options.remove(0)", "undefined");
-shouldBe("select2.options.length", "5");
-shouldBe("select2.selectedIndex", "3");
-shouldBe("select2.options[0].value", "'L'");
+shouldBe("select2.options.length", "4");
+shouldBe("select2.selectedIndex", "2");
+shouldBe("select2.options[0].value", "'M'");
debug("");
debug("2.16 Remove index 1 from non-empty Options");
shouldBe("select2.options.remove(1)", "undefined");
-shouldBe("select2.options.length", "4");
-shouldBe("select2.selectedIndex", "2");
-shouldBe("select2.options[1].value", "'N'");
+shouldBe("select2.options.length", "3");
+shouldBe("select2.selectedIndex", "1");
+shouldBe("select2.options[1].value", "'O'");
debug("");
debug("2.17 Detach select element");
@@ -240,4 +240,3 @@ shouldNotBe("select2.parentNode", "null");
shouldBe("select2.remove()", "undefined");
shouldBeNull("select2.parentNode");
debug("");
-

Powered by Google App Engine
This is Rietveld 408576698