OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <style> | 3 <style> |
4 :-webkit-any(h1), | 4 :-webkit-any(h1), |
5 :-webkit-any( #div1, b ), | 5 :-webkit-any( #div1, b ), |
6 :-webkit-any(.foo, #bar), | 6 :-webkit-any(.foo, #bar), |
7 :-webkit-any(i,p,:link,span:focus) { | 7 :-webkit-any(i,p,:link,span:focus) { |
8 background-color: blue; | 8 background-color: blue; |
9 } | 9 } |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 function focus(selector) | 116 function focus(selector) |
117 { | 117 { |
118 var element = document.querySelector(selector); | 118 var element = document.querySelector(selector); |
119 element.tabIndex = -1; | 119 element.tabIndex = -1; |
120 element.focus(); | 120 element.focus(); |
121 } | 121 } |
122 | 122 |
123 assertBlue("h1"); | 123 assertBlue("h1"); |
124 assertBlue("#div1"); | 124 assertBlue("#div1"); |
125 | 125 |
126 // Ensure the div with ID after the first div does not share a LayoutStyle with
the first div. | 126 // Ensure the div with ID after the first div does not share a ComputedStyle wit
h the first div. |
127 assertWhite(document.querySelectorAll("div")[1]); | 127 assertWhite(document.querySelectorAll("div")[1]); |
128 | 128 |
129 assertBlue("b"); | 129 assertBlue("b"); |
130 assertBlue("i"); | 130 assertBlue("i"); |
131 assertBlue("p"); | 131 assertBlue("p"); |
132 | 132 |
133 assertWhite("#span1"); | 133 assertWhite("#span1"); |
134 focus("#span1"); | 134 focus("#span1"); |
135 assertBlue("span:focus"); | 135 assertBlue("span:focus"); |
136 | 136 |
(...skipping 17 matching lines...) Expand all Loading... |
154 | 154 |
155 assertWhite("s"); | 155 assertWhite("s"); |
156 assertBlue("div span"); | 156 assertBlue("div span"); |
157 assertBlue("div ~ q"); | 157 assertBlue("div ~ q"); |
158 assertBlue("q+q"); | 158 assertBlue("q+q"); |
159 assertBlue("q>span"); | 159 assertBlue("q>span"); |
160 | 160 |
161 assertBlue("#test-last-child :first-child"); | 161 assertBlue("#test-last-child :first-child"); |
162 assertGreen("#test-last-child :last-child"); | 162 assertGreen("#test-last-child :last-child"); |
163 </script> | 163 </script> |
OLD | NEW |