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

Side by Side Diff: LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html

Issue 1157773008: W3C Test: Import web-platform-tests/html/{iana,infrastructure} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: W3CImportExpectations glitch Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>HTMLAllCollection Tests</title>
5 <link rel="author" title="Dan Druta" href="mailto:dan.druta@att.com"/>
6 <link rel="help" href="2.7.2.1 - Common Infrastructure/Common DOM Interfaces/Col lections/HTMLAllCollection"/>
7 <meta name="flags" content="TOKENS" />
8 <meta name="assert" content="TEST ASSERTION"/>
9 <script src="../../../../../../resources/testharness.js"></script>
10 <script src="../../../../../../resources/testharnessreport.js"></script>
11 </head>
12 <body>
13 <img src="../../../../images/green.png" name="picture">
14 <script>
15 test(function(){ assert_equals(document.all.length,12)}, "Test for HTMLAllCollec tion size");
16
17 test(function(){ assert_equals(document.all.item(0).tagName,"HTML")}, "Test look up by index using ()");
18
19 test(function(){ assert_equals(document.all[0].tagName,"HTML")}, "Test lookup by index using []");
20
21 test(function(){ assert_equals(document.all.tags("script").length,3)}, "Test for multiple occurence 3 <script> found");
22
23 test(function(){ assert_equals(document.all.item("picture").nodeName,"IMG")}, "T est lookup IMG by name");
24
25 test(function(){ assert_equals(document.all.namedItem("picture").nodeName,"IMG") }, "Test lookup IMG by namedItem ");
26
27 test(function(){ assert_equals(document.all("picture").nodeName,"IMG")}, "Test l ookup IMG in collection using ()");
28
29 test(function(){ assert_equals(document.all["picture"].nodeName,"IMG")}, "Test l ookup IMG in collection using []");
30 </script>
31 <div id="log"></div>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698