OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <link rel="help" href="http://dom.spec.whatwg.org/#interface-nonelementparentnod e"> | |
5 <script src="../../../resources/js-test.js"></script> | |
6 </head> | |
7 <body> | |
8 <div id="notInFragment"></div> | |
9 <script> | |
10 description("Tests that getElementById() API is exposed on DocumentFragment node s."); | |
11 | |
12 var fragment = new DocumentFragment(); | |
13 var div = document.createElement("div", ""); | |
14 div.id = "divID"; | |
15 fragment.appendChild(div); | |
16 var a = document.createElement("a", ""); | |
17 a.id = "aID"; | |
18 div.appendChild(a); | |
19 | |
20 shouldBe("fragment.getElementById('divID')", "div"); | |
21 shouldBe("fragment.getElementById('aID')", "a"); | |
22 shouldBeNull("fragment.getElementById('notInFragment')"); | |
23 shouldBeNull("fragment.getElementById('doesNotExist')"); | |
abarth-chromium
2014/04/28 18:25:25
Does this test all the paths through the code you'
Inactive
2014/04/28 18:31:49
No, I will improve the test to cover the duplicate
Inactive
2014/04/28 18:42:02
Done.
| |
24 </script> | |
25 </body> | |
26 </html> | |
OLD | NEW |