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

Side by Side Diff: LayoutTests/fast/dom/nodelist-item-parameter.html

Issue 48903019: Delete js-test-post.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#dom-nodelist-i tem"> 4 <link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#dom-nodelist-i tem">
5 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../js/resources/js-test-pre.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <span id="target"> 8 <span id="target">
9 <div id="a"></div> 9 <div id="a"></div>
10 <div id="b"></div> 10 <div id="b"></div>
11 </span> 11 </span>
12 <script> 12 <script>
13 description("Tests that the NodeList.item() argument is correctly validated."); 13 description("Tests that the NodeList.item() argument is correctly validated.");
14 14
15 var nodeList = document.getElementById("target").querySelectorAll('div'); 15 var nodeList = document.getElementById("target").querySelectorAll('div');
16 shouldBe("nodeList.__proto__", "NodeList.prototype"); 16 shouldBe("nodeList.__proto__", "NodeList.prototype");
17 17
18 shouldBeEqualToString("nodeList.item(0).id", "a"); 18 shouldBeEqualToString("nodeList.item(0).id", "a");
19 shouldBeEqualToString("nodeList.item(1).id", "b"); 19 shouldBeEqualToString("nodeList.item(1).id", "b");
20 shouldBeNull("nodeList.item(2)"); 20 shouldBeNull("nodeList.item(2)");
21 shouldBeNull("nodeList.item(-1)"); 21 shouldBeNull("nodeList.item(-1)");
22 shouldBeEqualToString("nodeList.item(-4294967295).id", "b"); // Wraps to 1. 22 shouldBeEqualToString("nodeList.item(-4294967295).id", "b"); // Wraps to 1.
23 shouldThrow("nodeList.item()", '"TypeError: Failed to execute \'item\' on \'Node List\': 1 argument required, but only 0 present."'); 23 shouldThrow("nodeList.item()", '"TypeError: Failed to execute \'item\' on \'Node List\': 1 argument required, but only 0 present."');
24 </script> 24 </script>
25 <script src="../js/resources/js-test-post.js"></script>
26 </body> 25 </body>
27 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698