blob: c5ff97e60271d2a4a83c12c7bb35a1919bd2df01 [file] [log] [blame]
utatane.tea@gmail.com4bacf522014-09-13 00:03:33 +00001<!doctype html>
2<html id=htmlDocument>
3<head>
4<script src="../../resources/js-test-pre.js"></script>
5</head>
6<body>
7<div style="display:none">
8<t0>
9 <t0></t0>
10</t0>
11<t1>
12 <t0></t0>
13</t1>
14
15
16<t3></t3>
17
18<t4>
19 <t5 id="t5"></t5>
20</t4>
21<t6>
22 <ng>
23 <t7 class="ok"></t7>
24 </ng>
25</t6>
26
27<t8></t8>
28<t9></t9>
29<t9></t9>
30<t10>
31 <t11 class="ng"></t11>
32</t10>
33
34<ok class="t12"></ok>
35<ok class="t13 t14 t15"></ok>
36
37<ok class="t16"></ok>
38<ok class="t17">
39 <t18></t18>
40 <t18></t18>
41 <t18></t18>
42 <t18></t18>
43 <t18></t18>
44</ok>
45<ok class="t17">
46 <t18></t18>
47 <t18></t18>
48 <t18></t18>
49 <t18></t18>
50 <t18></t18>
51</ok>
52
53</div>
54</body>
55<script>
56description('Test cases when the multiple selectors are provided');
57
58shouldBe('document.body.querySelectorAll("t0, t1").length', '4');
59shouldBe('document.body.querySelectorAll("#t2, t3").length', '1');
60shouldBe('document.body.querySelectorAll("t4> #t5, t6 t7.ok").length', '2');
61shouldBe('document.body.querySelectorAll("t8 + t9, t10 t11.ok").length', '1');
62shouldBe('document.body.querySelectorAll("t8 + t9, t10 t11.ok").length', '1');
63shouldBe('document.body.querySelectorAll(".t12, .t13, .t14, .t15").length', '2');
64
65debug('CSS JIT compile may fail, fallback to the slow path.')
66shouldBe('document.body.querySelectorAll(".t16, .t17>t18:nth-last-child(1)").length', '3');
67</script>
68<script src="../../resources/js-test-post.js"></script>
69</html>