4 <script src=
"../../resources/js-test.js"></script>
6 <body id=
"body" class=
"body">
7 <div class=
"parentSibling"></div>
9 <div id=
"sibling" class=
"sibling"></div>
10 <div id=
"rootNode" class=
"rootNode">
21 description('Test for crbug.com/304069: querySelectorAll regression.');
23 var rootNode
= document
.getElementById('rootNode');
24 shouldBe("rootNode.querySelectorAll('#body div').length", "6");
25 shouldBe("rootNode.querySelectorAll('#body').length", "0");
26 shouldBe("rootNode.querySelectorAll('div + #rootNode div').length", "6");
28 shouldBe("rootNode.querySelectorAll('.sibling + .rootNode div').length", "6");
29 shouldBe("rootNode.querySelectorAll('.sibling ~ .rootNode div').length", "6");
30 shouldBe("rootNode.querySelectorAll('.sibling .rootNode div').length", "0");
31 shouldBe("rootNode.querySelectorAll('.sibling div').length", "0");
32 shouldBe("rootNode.querySelectorAll('.body .rootNode div').length", "6");
33 shouldBe("rootNode.querySelectorAll('.body .sibling + .rootNode div').length", "6");
34 shouldBe("rootNode.querySelectorAll('.body .parentSibling + .parent div').length", "6");
35 shouldBe("rootNode.querySelectorAll('.body .parentSibling ~ .parent div').length", "6");
36 shouldBe("rootNode.querySelectorAll('.body div').length", "6");
37 shouldBe("rootNode.querySelectorAll('.body').length", "0");
39 shouldBe("rootNode.querySelectorAll('body div').length", "6");
40 shouldBe("rootNode.querySelectorAll('body').length", "0");
42 shouldBeNull("rootNode.querySelector('#body')");
43 shouldBeNull("rootNode.querySelector('.body')");
44 shouldBeNull("rootNode.querySelector('body')");