1 This tests setting and re-serialization of some CSS selectors.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS setThenReadSelectorText('') is '_foo'
7 PASS setThenReadSelectorText('123') is '_foo'
8 PASS setThenReadSelectorText('-') is '_foo'
9 PASS setThenReadSelectorText('$') is '_foo'
10 PASS setThenReadSelectorText(':') is '_foo'
11 PASS setThenReadSelectorText('.') is '_foo'
12 PASS setThenReadSelectorText('#') is '_foo'
13 PASS setThenReadSelectorText('[]') is '_foo'
14 PASS setThenReadSelectorText('()') is '_foo'
16 PASS setThenReadSelectorText('*') is '*'
17 PASS setThenReadSelectorText('a') is 'a'
18 PASS setThenReadSelectorText('#a') is '#a'
19 PASS setThenReadSelectorText('.a') is '.a'
20 PASS setThenReadSelectorText(':active') is ':active'
21 PASS setThenReadSelectorText('[a]') is '[a]'
22 PASS setThenReadSelectorText('[a="b"]') is '[a="b"]'
23 PASS setThenReadSelectorText('[a~="b"]') is '[a~="b"]'
24 PASS setThenReadSelectorText('[a|="b"]') is '[a|="b"]'
25 PASS setThenReadSelectorText('[a^="b"]') is '[a^="b"]'
26 PASS setThenReadSelectorText('[a$="b"]') is '[a$="b"]'
27 PASS setThenReadSelectorText('[a*="b"]') is '[a*="b"]'
29 PASS setThenReadSelectorText('*|a') is '*|a'
30 PASS setThenReadSelectorText('n|a') is 'n|a'
31 PASS setThenReadSelectorText('*|*') is '*|*'
32 PASS setThenReadSelectorText('n|*') is 'n|*'
33 PASS setThenReadSelectorText('[*|a]') is '[*|a]'
34 PASS setThenReadSelectorText('[n|a]') is '[n|a]'
36 PASS setThenReadSelectorText('a:active') is 'a:active'
37 PASS setThenReadSelectorText('a b') is 'a b'
38 PASS setThenReadSelectorText('a + b') is 'a + b'
39 PASS setThenReadSelectorText('a ~ b') is 'a ~ b'
40 PASS setThenReadSelectorText('a > b') is 'a > b'
42 PASS setThenReadSelectorText(':active') is ':active'
43 PASS setThenReadSelectorText(':checked') is ':checked'
44 PASS setThenReadSelectorText(':disabled') is ':disabled'
45 PASS setThenReadSelectorText(':empty') is ':empty'
46 PASS setThenReadSelectorText(':enabled') is ':enabled'
47 PASS setThenReadSelectorText(':first-child') is ':first-child'
48 PASS setThenReadSelectorText(':first-of-type') is ':first-of-type'
49 PASS setThenReadSelectorText(':focus') is ':focus'
50 PASS setThenReadSelectorText(':hover') is ':hover'
51 PASS setThenReadSelectorText(':indeterminate') is ':indeterminate'
52 PASS setThenReadSelectorText(':link') is ':link'
53 PASS setThenReadSelectorText(':not(:placeholder-shown)') is ':not(:placeholder-shown)'
54 PASS setThenReadSelectorText(':placeholder-shown') is ':placeholder-shown'
55 PASS setThenReadSelectorText(':root') is ':root'
56 PASS setThenReadSelectorText(':target') is ':target'
57 PASS setThenReadSelectorText(':visited') is ':visited'
59 PASS setThenReadSelectorText(':lang(a)') is ':lang(a)'
60 PASS setThenReadSelectorText(':not(a)') is ':not(a)'
61 PASS setThenReadSelectorText(':-webkit-any(a,b,p)') is ':-webkit-any(a,b,p)'
63 PASS setThenReadSelectorText('::after') is '::after'
64 PASS setThenReadSelectorText('::before') is '::before'
65 PASS setThenReadSelectorText('::first-letter') is '::first-letter'
66 PASS setThenReadSelectorText('::first-line') is '::first-line'
67 PASS setThenReadSelectorText('::selection') is '::selection'
69 PASS setThenReadSelectorText(':-webkit-any-link') is ':-webkit-any-link'
70 PASS setThenReadSelectorText(':-webkit-autofill') is ':-webkit-autofill'
71 PASS setThenReadSelectorText(':-webkit-drag') is ':-webkit-drag'
73 PASS setThenReadSelectorText('::-webkit-file-upload-button') is '*::-webkit-file-upload-button'
74 PASS setThenReadSelectorText('::-webkit-search-cancel-button') is '*::-webkit-search-cancel-button'
75 PASS setThenReadSelectorText('::-webkit-search-decoration') is '*::-webkit-search-decoration'
76 PASS setThenReadSelectorText('::-webkit-search-results-button') is '*::-webkit-search-results-button'
77 PASS setThenReadSelectorText('::-webkit-search-results-decoration') is '*::-webkit-search-results-decoration'
78 PASS setThenReadSelectorText('::-webkit-slider-thumb') is '*::-webkit-slider-thumb'
80 PASS setThenReadSelectorText('a::-webkit-slider-thumb') is 'a::-webkit-slider-thumb'
81 PASS setThenReadSelectorText('a ::-webkit-slider-thumb') is 'a *::-webkit-slider-thumb'
82 PASS setThenReadSelectorText('[a]::-webkit-slider-thumb') is '[a]::-webkit-slider-thumb'
83 PASS setThenReadSelectorText('[a] ::-webkit-slider-thumb') is '[a] *::-webkit-slider-thumb'
84 PASS setThenReadSelectorText('.a::-webkit-slider-thumb') is '.a::-webkit-slider-thumb'
85 PASS setThenReadSelectorText('.a ::-webkit-slider-thumb') is '.a *::-webkit-slider-thumb'
86 PASS setThenReadSelectorText('#a::-webkit-slider-thumb') is '#a::-webkit-slider-thumb'
87 PASS setThenReadSelectorText('#a ::-webkit-slider-thumb') is '#a *::-webkit-slider-thumb'
88 PASS setThenReadSelectorText('* ::-webkit-slider-thumb') is '* *::-webkit-slider-thumb'
90 PASS setThenReadSelectorText('a[b]::-webkit-slider-thumb') is 'a[b]::-webkit-slider-thumb'
91 PASS setThenReadSelectorText('a.b::-webkit-slider-thumb') is 'a.b::-webkit-slider-thumb'
92 PASS setThenReadSelectorText('a#b::-webkit-slider-thumb') is 'a#b::-webkit-slider-thumb'
93 PASS setThenReadSelectorText('a[b].c#d::-webkit-slider-thumb') is 'a[b].c#d::-webkit-slider-thumb'
95 PASS setThenReadSelectorText('input:not([type="file"]):focus') is 'input:not([type="file"]):focus'
96 PASS setThenReadSelectorText(':-webkit-any([type="file"])') is ':-webkit-any([type="file"])'
97 PASS setThenReadSelectorText(':-webkit-any(:hover)') is ':-webkit-any(:hover)'
98 PASS setThenReadSelectorText('input:-webkit-any([type="file"],:hover,:focus):enabled') is 'input:-webkit-any([type="file"],:hover,:focus):enabled'
99 PASS setThenReadSelectorText(':-webkit-any(input[type="file"],a:hover,button:focus)') is ':-webkit-any(input[type="file"],a:hover,button:focus)'
100 PASS setThenReadSelectorText(':-webkit-any(.class1.class2.class3)') is ':-webkit-any(.class1.class2.class3)'
101 PASS setThenReadSelectorText(':-webkit-any(.class1:hover)') is ':-webkit-any(.class1:hover)'
102 PASS setThenReadSelectorText(':-webkit-any(a.class1.class2.class3:hover)') is ':-webkit-any(a.class1.class2.class3:hover)'
104 PASS setThenReadSelectorText('*:active') is ':active'
105 PASS setThenReadSelectorText('|a') is '|a'
107 PASS setThenReadSelectorText('input[type=file]:focus') is 'input[type="file"]:focus'
109 PASS setThenReadSelectorText('a+b') is 'a + b'
110 PASS setThenReadSelectorText('a~b') is 'a ~ b'
111 PASS setThenReadSelectorText('a>b') is 'a > b'
113 PASS setThenReadSelectorText(':after') is '::after'
114 PASS setThenReadSelectorText(':before') is '::before'
115 PASS setThenReadSelectorText(':first-letter') is '::first-letter'
116 PASS setThenReadSelectorText(':first-line') is '::first-line'
117 PASS setThenReadSelectorText(':-webkit-any( a.class1 , #id,[attr] )') is ':-webkit-any(a.class1,#id,[attr])'
119 PASS successfullyParsed is true