Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / id-in-getelement01.html
blob16c23d0767dfb1dff5047175cb37512b553126a0
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
7 <div name='name1' id='id1'/>
8 <div name='name2' id='id2'/>
9 <div name='name3' id='id2'/>
11 <script>
12 description("Test getElementById");
14 var elem;
16 // element found with exact match
17 elem = document.getElementById('id1');
18 shouldBe('elem.getAttribute("name")', '"name1"');
20 // multiple elements having same id return the first one
21 elem = document.getElementById('id2');
22 shouldBe('elem.getAttribute("name")', '"name2"');
24 // element with id not found
25 elem = document.getElementById('id3');
26 shouldBeNull('elem');
27 </script>
28 </body>
29 </html>