Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / HTMLDocument / named-item-multiple-match.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>
5 Tests that the named item created for an image with an ID is correctly removed.
6 The test passes, if you see a "PASS" message in the div below.
7 </p>
8 <form name="someName" title="first"></form>
9 <form name="someName" title="second"></form>
10 <script src="../../../resources/js-test.js"></script>
11 <script>
12
13 var collection;
14 shouldBe('collection = window.someName; collection.length', '2');
15 shouldBe('collection[0].title', '"first"');
16 shouldBe('collection[1].title', '"second"');
17 shouldBe('collection[1]; window.someName', 'collection');
18
19 shouldBe('collection = document.someName; collection.length', '2');
20 shouldBe('collection[0].title', '"first"');
21 shouldBe('collection[1].title', '"second"');
22 shouldBe('collection[1]; document.someName', 'collection');
23
24 </script>
25 </body>
26 </html>
27