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

Side by Side Diff: LayoutTests/fast/dom/DocumentFragment/get-element-by-id.html

Issue 251633002: Add support for DocumentFragment.getElementById() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use isInTreeScope() instead of isInDocument() Created 6 years, 8 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 <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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DocumentFragment/get-element-by-id-expected.txt » ('j') | Source/core/dom/ContainerNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698