Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / selectors / querySelector-scope.html
blob860c809945a89cd05d5262205081e08bb8c59d2d
1 <!doctype html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
8 </script>
9 </head>
10 <body>
11 <ul>
12 <li id='scope'><a>abc</a></li>
13 <li>def</li>
14 <li><a>efg</a></li>
15 </ul>
16 </body>
17 <script>
18 description('This test makes sure that :scope works correctly.');
20 var scope = document.getElementById('scope');
21 shouldBe('scope.querySelectorAll("ul a").length', '1');
22 shouldBe('scope.querySelector("ul a")', 'scope.firstChild');
23 shouldBe('scope.querySelectorAll(":scope ul a").length', '0');
24 shouldBeNull('scope.querySelector(":scope ul a")');
25 shouldBe('document.querySelectorAll(":scope ul a").length', '2');
26 shouldBe('document.querySelectorAll(":root ul a").length', '2');
28 shouldBe('document.querySelectorAll(":scope a").length', '2');
29 shouldBe('scope.querySelectorAll(":scope a").length', '1');
30 shouldBe('scope.querySelectorAll(":scope a").item(0)', 'scope.firstChild');
31 shouldBe('scope.querySelector(":scope a")', 'scope.querySelectorAll(":scope a").item(0)');
32 </script>
33 </html>