Chromium Code Reviews| OLD | NEW |
|---|---|
| 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> |
| OLD | NEW |