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

Side by Side Diff: LayoutTests/fast/dom/SelectorAPI/duplicate-id-scope.html

Issue 93863004: Regression(r164102): CSS Selector queries on duplicate ids match non-descendant elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <span id="duplicateId1"></span>
8 <span id="duplicateId1"></span>
9 <span id="duplicateId2"></span>
10 <span id="duplicateId2"></span>
11 <div id="scopeDiv">
12 <span id="duplicateId1"></span>
13 <span id="duplicateId1"></span>
14 <span id="duplicateId1"></span>
15 <span id="duplicateId1"></span>
16 </div>
17 <script>
18 description("Test that CSS selector queries on duplicate Ids respect sco pe.");
19
20 shouldBe("document.querySelectorAll('#duplicateId1').length", "6");
21 shouldBe("document.querySelectorAll('#duplicateId2').length", "2");
22
23 scopeDiv = document.getElementById("scopeDiv");
24 shouldBe("scopeDiv.querySelectorAll('#duplicateId1').length", "4");
25 shouldBeNull("scopeDiv.querySelector('#duplicateId2')");
26 shouldBe("scopeDiv.querySelectorAll('#duplicateId2').length", "0");
27 </script>
28 </body>
29 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/SelectorAPI/duplicate-id-scope-expected.txt » ('j') | Source/core/dom/SelectorQuery.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698