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

Side by Side Diff: LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg.html

Issue 1242233002: The index argument for HTMLCollection item() api should not be optional (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <a id="testLink"></a> 5 <a id="testLink"></a>
6 <script> 6 <script>
7 description("This tests verifies that HTMLCollection.namedItem() argument is man datory"); 7 description("This tests verifies that HTMLCollection.namedItem() argument is man datory");
8 8
9 var testLink = document.getElementById("testLink"); 9 var testLink = document.getElementById("testLink");
10 var htmlCollection = document.getElementsByTagName("a"); 10 var htmlCollection = document.getElementsByTagName("a");
11 shouldBe("htmlCollection.__proto__", "HTMLCollection.prototype"); 11 shouldBe("htmlCollection.__proto__", "HTMLCollection.prototype");
12 shouldBe("htmlCollection.length", "1"); 12 shouldBe("htmlCollection.length", "1");
13 shouldBe("htmlCollection.namedItem('testLink')", "testLink"); 13 shouldBe("htmlCollection.namedItem('testLink')", "testLink");
14 shouldThrow("htmlCollection.namedItem()", '"TypeError: Failed to execute \'named Item\' on \'HTMLCollection\': 1 argument required, but only 0 present."'); 14 shouldThrow("htmlCollection.namedItem()", '"TypeError: Failed to execute \'named Item\' on \'HTMLCollection\': 1 argument required, but only 0 present."');
15 shouldThrow("htmlCollection.item()", '"TypeError: Failed to execute \'item\' on \'HTMLCollection\': 1 argument required, but only 0 present."');
philipj_slow 2015/07/20 07:21:33 "This test verifies that HTMLCollection.namedItem(
shiva.jm 2015/07/20 09:55:54 Done.
15 </script> 16 </script>
16 </body> 17 </body>
17 </html> 18 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698