| <html> |
| <head id="head"> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| |
| description("This tests setting and re-serialization of some CSS selectors."); |
| |
| var bogusSelector = "_foo"; |
| |
| function setThenReadSelectorText(selector) |
| { |
| var styleElement = document.getElementById("style"); |
| var head = document.getElementById("head"); |
| if (styleElement) |
| head.removeChild(styleElement); |
| |
| styleElement = document.createElement("style"); |
| styleElement.id = "style"; |
| var head = document.getElementById("head"); |
| head.appendChild(styleElement); |
| |
| // First, create a rule with a bogus selector. |
| styleElement.appendChild(document.createTextNode(bogusSelector + " { }")); |
| // Now, set the desired selector text. |
| styleElement.sheet.cssRules[0].selectorText = selector; |
| return styleElement.sheet.cssRules[0].selectorText; |
| } |
| |
| function expectedSerializedLangSelector(selector) |
| { |
| var args = /:lang\(([^)]+)/.exec(selector); |
| if (!args || !args[1]) |
| return selector; |
| |
| args = args[1].split(/\s*,\s*/); |
| var expected = ':lang('; |
| for (var i = 0; i < args.length; ++i) { |
| var arg = args[i]; |
| var hasQuotes = arg.indexOf('"') == 0 && arg.lastIndexOf('"') == arg.length - 1; |
| if (!hasQuotes) |
| expected += '"'; |
| expected += args[i]; |
| if (!hasQuotes) |
| expected += '"'; |
| if (i < args.length - 1) |
| expected += ', '; |
| } |
| expected += ')'; |
| return expected; |
| } |
| |
| function testSelectorRoundTrip(selector, expectFailure) |
| { |
| var expected = selector.indexOf(":lang") == 0 ? expectedSerializedLangSelector(selector) : selector; |
| shouldBe("setThenReadSelectorText('" + selector + "')", "'" + (expectFailure ? bogusSelector : expected) + "'"); |
| } |
| |
| testSelectorRoundTrip('', true); |
| testSelectorRoundTrip('123', true); |
| testSelectorRoundTrip('-', true); |
| testSelectorRoundTrip('$', true); |
| testSelectorRoundTrip(':', true); |
| testSelectorRoundTrip('.', true); |
| testSelectorRoundTrip('#', true); |
| testSelectorRoundTrip('[]', true); |
| testSelectorRoundTrip('()', true); |
| |
| debug(''); |
| |
| testSelectorRoundTrip('*'); |
| testSelectorRoundTrip('a'); |
| testSelectorRoundTrip('#a'); |
| testSelectorRoundTrip('.a'); |
| testSelectorRoundTrip(':active'); |
| testSelectorRoundTrip('[a]'); |
| testSelectorRoundTrip('[a="b"]'); |
| testSelectorRoundTrip('[a~="b"]'); |
| testSelectorRoundTrip('[a|="b"]'); |
| testSelectorRoundTrip('[a^="b"]'); |
| testSelectorRoundTrip('[a$="b"]'); |
| testSelectorRoundTrip('[a*="b"]'); |
| testSelectorRoundTrip('[a="b" i]'); |
| testSelectorRoundTrip('[a~="b" i]'); |
| testSelectorRoundTrip('[a|="b" i]'); |
| testSelectorRoundTrip('[a^="b" i]'); |
| testSelectorRoundTrip('[a$="b" i]'); |
| testSelectorRoundTrip('[a*="b" i]'); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText('*|a')", "'a'"); |
| shouldBe("setThenReadSelectorText('*|*')", "'*'"); |
| testSelectorRoundTrip('[*|a]'); |
| testSelectorRoundTrip('|*'); |
| testSelectorRoundTrip('[*|a]'); |
| shouldBe("setThenReadSelectorText('[|a]')", "'[a]'"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip('a:active'); |
| testSelectorRoundTrip('a b'); |
| testSelectorRoundTrip('a + b'); |
| testSelectorRoundTrip('a ~ b'); |
| testSelectorRoundTrip('a > b'); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(":active"); |
| testSelectorRoundTrip(":any-link"); |
| testSelectorRoundTrip(":checked"); |
| testSelectorRoundTrip(":disabled"); |
| testSelectorRoundTrip(":empty"); |
| testSelectorRoundTrip(":enabled"); |
| testSelectorRoundTrip(":first-child"); |
| testSelectorRoundTrip(":first-of-type"); |
| testSelectorRoundTrip(":focus"); |
| testSelectorRoundTrip(":hover"); |
| testSelectorRoundTrip(":indeterminate"); |
| testSelectorRoundTrip(":link"); |
| testSelectorRoundTrip(":not(:placeholder-shown)"); |
| testSelectorRoundTrip(":placeholder-shown"); |
| testSelectorRoundTrip(":root"); |
| testSelectorRoundTrip(":target"); |
| testSelectorRoundTrip(":visited"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(":dir(a)"); |
| testSelectorRoundTrip(":lang(\"a\")"); |
| testSelectorRoundTrip(":lang(a)"); |
| testSelectorRoundTrip(":not(a)"); |
| testSelectorRoundTrip(":role(a)"); |
| testSelectorRoundTrip(":-webkit-any(a, b, p)"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("::after"); |
| testSelectorRoundTrip("::before"); |
| testSelectorRoundTrip("::first-letter"); |
| testSelectorRoundTrip("::first-line"); |
| testSelectorRoundTrip("::selection"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(":-webkit-any-link"); |
| testSelectorRoundTrip(":-webkit-autofill"); |
| testSelectorRoundTrip(":-webkit-drag"); |
| |
| testSelectorRoundTrip('a:any-link'); |
| testSelectorRoundTrip('a :any-link'); |
| testSelectorRoundTrip('div:any-link'); |
| testSelectorRoundTrip('div :any-link'); |
| testSelectorRoundTrip(':any-link > div'); |
| testSelectorRoundTrip(':any-link + div'); |
| testSelectorRoundTrip(':not(:any-link)'); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(":nth-child(odd)"); |
| testSelectorRoundTrip(":nth-child(even)"); |
| testSelectorRoundTrip(":nth-child(n)"); |
| testSelectorRoundTrip(":nth-child(-n)"); |
| testSelectorRoundTrip(":nth-child(5)"); |
| testSelectorRoundTrip(":nth-child(-5)"); |
| testSelectorRoundTrip(":nth-child(5n+7)"); |
| testSelectorRoundTrip(":nth-child(-5n+7)"); |
| testSelectorRoundTrip(":nth-child(5n-7)"); |
| testSelectorRoundTrip(":nth-child(-5n-7)"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(":nth-child(odd of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(even of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(n of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(-n of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(5 of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(-5 of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(5n+7 of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(-5n+7 of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(5n-7 of .foo, :nth-child(odd))"); |
| testSelectorRoundTrip(":nth-child(-5n-7 of .foo, :nth-child(odd))"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(":nth-last-child(odd of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(even of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(n of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(-n of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(5 of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(-5 of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(5n+7 of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(-5n+7 of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(5n-7 of .foo, :nth-last-child(odd))"); |
| testSelectorRoundTrip(":nth-last-child(-5n-7 of .foo, :nth-last-child(odd))"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(':matches(single)'); |
| testSelectorRoundTrip(':matches(a, b, p)'); |
| testSelectorRoundTrip(':matches(#alice, #bob, #chris)'); |
| testSelectorRoundTrip(':matches(.selector, #tama, #hanayo, #midoriko)'); |
| testSelectorRoundTrip(':matches(.name, #ok, :visited)'); |
| testSelectorRoundTrip(':matches(.name, #ok, :visited, :link)'); |
| testSelectorRoundTrip(':matches(.name, #ok, :matches(:visited))'); |
| testSelectorRoundTrip(':matches(.name, #ok, :not(:link))'); |
| testSelectorRoundTrip(':matches(.name, #ok, :not(:link))'); |
| testSelectorRoundTrip(':matches(.name, #ok, :-webkit-any(hello))'); |
| testSelectorRoundTrip(':matches(.name, #ok, :-webkit-any(.selector, #tama, #hanayo, #midoriko))'); |
| testSelectorRoundTrip(':matches([type="file"])'); |
| testSelectorRoundTrip(':matches(:hover)'); |
| testSelectorRoundTrip('input:matches([type="file"], :hover, :focus):enabled'); |
| testSelectorRoundTrip(':matches(input[type="file"], a:hover, button:focus)'); |
| testSelectorRoundTrip(':matches(.class1.class2.class3)'); |
| testSelectorRoundTrip(':matches(.class1:hover)'); |
| testSelectorRoundTrip(':matches(a.class1.class2.class3:hover)'); |
| testSelectorRoundTrip(':matches(::first-letter, ::first-line)'); |
| testSelectorRoundTrip(':matches(a > ::first-letter, b ~ ::first-line, c ::after, d + ::before)'); |
| testSelectorRoundTrip(':matches(.ok a > ::first-letter, .ok b ~ ::first-line, .ok c ::after, .ok d + ::before)'); |
| testSelectorRoundTrip(':matches(.ok a > .ok ::first-letter, .ok b ~ .ok ::first-line, .ok c .ok ::after, .ok d + .ok ::before)'); |
| testSelectorRoundTrip(':-webkit-any(:matches(single))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(a, b, p))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(#alice, #bob, #chris))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.selector, #tama, #hanayo, #midoriko))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :visited))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :visited, :link))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :matches(:visited)))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :not(:link)))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :not(:link)))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :-webkit-any(hello)))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.name, #ok, :-webkit-any(.selector, #tama, #hanayo, #midoriko)))'); |
| testSelectorRoundTrip(':-webkit-any(:matches([type="file"]))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(:hover))'); |
| testSelectorRoundTrip(':-webkit-any(input:matches([type="file"], :hover, :focus):enabled)'); |
| testSelectorRoundTrip(':-webkit-any(:matches(input[type="file"], a:hover, button:focus))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.class1.class2.class3))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.class1:hover))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(a.class1.class2.class3:hover))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(::first-letter, ::first-line))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(a > ::first-letter, b ~ ::first-line, c ::after, d + ::before))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.ok a > ::first-letter, .ok b ~ ::first-line, .ok c ::after, .ok d + ::before))'); |
| testSelectorRoundTrip(':-webkit-any(:matches(.ok a > .ok ::first-letter, .ok b ~ .ok ::first-line, .ok c .ok ::after, .ok d + .ok ::before))'); |
| |
| debug(''); |
| |
| testSelectorRoundTrip(':not(div)'); |
| testSelectorRoundTrip(':not(.div)'); |
| testSelectorRoundTrip(':not(#div)'); |
| testSelectorRoundTrip(':not([div])'); |
| testSelectorRoundTrip(':not(:empty)'); |
| testSelectorRoundTrip(':not(div.div#div[div]:empty)'); |
| testSelectorRoundTrip(':not(div.div:empty[div]#div)'); |
| testSelectorRoundTrip(':not(div.div, #div[div], :empty)'); |
| testSelectorRoundTrip(':not(div, .div, #div, [div], :empty)'); |
| |
| testSelectorRoundTrip(':not(:not(div))'); |
| testSelectorRoundTrip(':not(:not(div)):not(:not(foo)):not(:not(bar))'); |
| testSelectorRoundTrip(':not(:not(div, :not(foo, bar))):not(:not(foo)):not(:not(bar, baz))'); |
| |
| testSelectorRoundTrip(':not(:matches(*))'); |
| testSelectorRoundTrip(':not(:matches(foo, bar))'); |
| testSelectorRoundTrip(':not(:matches(foo, bar), :matches(.foo, .bar), :matches(#foo, #bar), :matches([foo], [bar]))'); |
| testSelectorRoundTrip(':not(:matches(foo, bar:not(:empty)), :matches(.foo, .bar:not(:not(.mosaic))), :matches(#foo, #bar), :matches([foo], [bar]))'); |
| |
| testSelectorRoundTrip(':nth-child(2n of :not(a.b, c#d.e))'); |
| testSelectorRoundTrip(':not(:nth-child(2n of :not(a.b, c#d.e)))'); |
| |
| testSelectorRoundTrip(':not(a .b, #c > [d], e + f:empty, .g ~ #h:first-child)'); |
| testSelectorRoundTrip('a:not(a .b, #c > [d], e + f:empty, .g ~ #h:first-child) b + c:not(a .b, #c > [d], e + f:empty, .g ~ #h:first-child) ~ d:not(a .b, #c > [d], e + f:empty, .g ~ #h:first-child) > d:not(a .b, #c > [d], e + f:empty, .g ~ #h:first-child)'); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText('::-webkit-file-upload-button')", "'::-webkit-file-upload-button'"); |
| shouldBe("setThenReadSelectorText('::-webkit-search-cancel-button')", "'::-webkit-search-cancel-button'"); |
| shouldBe("setThenReadSelectorText('::-webkit-search-decoration')", "'::-webkit-search-decoration'"); |
| shouldBe("setThenReadSelectorText('::-webkit-search-results-button')", "'::-webkit-search-results-button'"); |
| shouldBe("setThenReadSelectorText('::-webkit-search-results-decoration')", "'::-webkit-search-results-decoration'"); |
| shouldBe("setThenReadSelectorText('::-webkit-slider-thumb')", "'::-webkit-slider-thumb'"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a::-webkit-slider-thumb"); |
| shouldBe("setThenReadSelectorText('a ::-webkit-slider-thumb')", "'a ::-webkit-slider-thumb'"); |
| testSelectorRoundTrip("[a]::-webkit-slider-thumb"); |
| shouldBe("setThenReadSelectorText('[a] ::-webkit-slider-thumb')", "'[a] ::-webkit-slider-thumb'"); |
| testSelectorRoundTrip(".a::-webkit-slider-thumb"); |
| shouldBe("setThenReadSelectorText('.a ::-webkit-slider-thumb')", "'.a ::-webkit-slider-thumb'"); |
| testSelectorRoundTrip("#a::-webkit-slider-thumb"); |
| shouldBe("setThenReadSelectorText('#a ::-webkit-slider-thumb')", "'#a ::-webkit-slider-thumb'"); |
| shouldBe("setThenReadSelectorText('* ::-webkit-slider-thumb')", "'* ::-webkit-slider-thumb'"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a[b]::-webkit-slider-thumb"); |
| testSelectorRoundTrip("a.b::-webkit-slider-thumb"); |
| testSelectorRoundTrip("a#b::-webkit-slider-thumb"); |
| testSelectorRoundTrip("a[b].c#d::-webkit-slider-thumb"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a[b]::placeholder"); |
| testSelectorRoundTrip("a.b::placeholder"); |
| testSelectorRoundTrip("a#b::placeholder"); |
| testSelectorRoundTrip("a[b].c#d::placeholder"); |
| testSelectorRoundTrip("a[b]::-webkit-input-placeholder"); |
| testSelectorRoundTrip("a.b::-webkit-input-placeholder"); |
| testSelectorRoundTrip("a#b::-webkit-input-placeholder"); |
| testSelectorRoundTrip("a[b].c#d::-webkit-input-placeholder"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a[b]:default"); |
| testSelectorRoundTrip("a.b:default"); |
| testSelectorRoundTrip("a#b:default"); |
| testSelectorRoundTrip("a[b].c#d:default"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a[b]:in-range"); |
| testSelectorRoundTrip("a.b:in-range"); |
| testSelectorRoundTrip("a#b:in-range"); |
| testSelectorRoundTrip("a[b].c#d:in-range"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a[b]:out-of-range"); |
| testSelectorRoundTrip("a.b:out-of-range"); |
| testSelectorRoundTrip("a#b:out-of-range"); |
| testSelectorRoundTrip("a[b].c#d:out-of-range"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip("a[b]:focus-within"); |
| testSelectorRoundTrip("a.b:focus-within"); |
| testSelectorRoundTrip("a#b:focus-within"); |
| testSelectorRoundTrip("a[b].c#d:focus-within"); |
| |
| debug(''); |
| |
| testSelectorRoundTrip('input:not([type="file"]):focus'); |
| testSelectorRoundTrip(':-webkit-any([type="file"])'); |
| testSelectorRoundTrip(':-webkit-any(:hover)'); |
| testSelectorRoundTrip('input:-webkit-any([type="file"], :hover, :focus):enabled'); |
| testSelectorRoundTrip(':-webkit-any(input[type="file"], a:hover, button:focus)'); |
| testSelectorRoundTrip(':-webkit-any(.class1.class2.class3)'); |
| testSelectorRoundTrip(':-webkit-any(.class1:hover)'); |
| testSelectorRoundTrip(':-webkit-any(a.class1.class2.class3:hover)'); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText('*:active')", "':active'"); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText('input[type=file]:focus')", "'input[type=\"file\"]:focus'"); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText('a+b')", "'a + b'"); |
| shouldBe("setThenReadSelectorText('a~b')", "'a ~ b'"); |
| shouldBe("setThenReadSelectorText('a>b')", "'a > b'"); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText(':after')", "'::after'"); |
| shouldBe("setThenReadSelectorText(':before')", "'::before'"); |
| shouldBe("setThenReadSelectorText(':first-letter')", "'::first-letter'"); |
| shouldBe("setThenReadSelectorText(':first-line')", "'::first-line'"); |
| shouldBe("setThenReadSelectorText(':-webkit-any( a.class1 , #id,[attr] )')","':-webkit-any(a.class1, #id, [attr])'"); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText(':matches(single )')", "':matches(single)'"); |
| shouldBe("setThenReadSelectorText(':matches(a,b ,p)')", "':matches(a, b, p)'"); |
| shouldBe("setThenReadSelectorText(':matches(#alice, #bob,#chris)')", "':matches(#alice, #bob, #chris)'"); |
| shouldBe("setThenReadSelectorText(':matches( .selector,#tama, #hanayo,#midoriko)')", "':matches(.selector, #tama, #hanayo, #midoriko)'"); |
| shouldBe("setThenReadSelectorText(':matches( .name,#ok,:visited )')", "':matches(.name, #ok, :visited)'"); |
| shouldBe("setThenReadSelectorText(':matches( .name,#ok, :visited, :link)')", "':matches(.name, #ok, :visited, :link)'"); |
| shouldBe("setThenReadSelectorText(':matches( .name,#ok, :matches(:visited ))')", "':matches(.name, #ok, :matches(:visited))'"); |
| shouldBe("setThenReadSelectorText(':matches(.name, #ok,:not(:link))')", "':matches(.name, #ok, :not(:link))'"); |
| shouldBe("setThenReadSelectorText(':matches(.name,#ok,:not(:link))')", "':matches(.name, #ok, :not(:link))'"); |
| shouldBe("setThenReadSelectorText(':matches( .name,#ok,:-webkit-any( hello))')", "':matches(.name, #ok, :-webkit-any(hello))'"); |
| shouldBe("setThenReadSelectorText(':matches( .name,#ok, :-webkit-any(.selector, #tama, #hanayo, #midoriko))')", "':matches(.name, #ok, :-webkit-any(.selector, #tama, #hanayo, #midoriko))'"); |
| shouldBe("setThenReadSelectorText(':matches( [type=\"file\"])')", "':matches([type=\"file\"])'"); |
| shouldBe("setThenReadSelectorText(':matches( :hover )')", "':matches(:hover)'"); |
| shouldBe("setThenReadSelectorText('input:matches([type=\"file\"],:hover,:focus):enabled')", "'input:matches([type=\"file\"], :hover, :focus):enabled'"); |
| shouldBe("setThenReadSelectorText(':matches(input[type=\"file\"], a:hover, button:focus)')", "':matches(input[type=\"file\"], a:hover, button:focus)'"); |
| shouldBe("setThenReadSelectorText(':matches( .class1.class2.class3 )')", "':matches(.class1.class2.class3)'"); |
| shouldBe("setThenReadSelectorText(':matches(.class1:hover )')", "':matches(.class1:hover)'"); |
| shouldBe("setThenReadSelectorText(':matches(a.class1.class2.class3:hover )')", "':matches(a.class1.class2.class3:hover)'"); |
| shouldBe("setThenReadSelectorText(':matches(:first-letter,::first-line)')", "':matches(::first-letter, ::first-line)'"); |
| shouldBe("setThenReadSelectorText(':matches(a>:first-letter,b ~ ::first-line, c :after, d+ :before)')", "':matches(a > ::first-letter, b ~ ::first-line, c ::after, d + ::before)'"); |
| shouldBe("setThenReadSelectorText(':matches(.ok a > ::first-letter, .ok b~ ::first-line, .ok c :after, .ok d +:before)')", "':matches(.ok a > ::first-letter, .ok b ~ ::first-line, .ok c ::after, .ok d + ::before)'"); |
| shouldBe("setThenReadSelectorText(':matches(.ok a> .ok ::first-letter, .ok b ~.ok :first-line, .ok c .ok ::after, .ok d + .ok ::before)')", "':matches(.ok a > .ok ::first-letter, .ok b ~ .ok ::first-line, .ok c .ok ::after, .ok d + .ok ::before)'"); |
| |
| debug(''); |
| |
| shouldBe("setThenReadSelectorText(':not(single )')", "':not(single)'"); |
| shouldBe("setThenReadSelectorText(':not(a,b ,p)')", "':not(a, b, p)'"); |
| shouldBe("setThenReadSelectorText(':not(#alice, #bob,#chris)')", "':not(#alice, #bob, #chris)'"); |
| shouldBe("setThenReadSelectorText(':not( .selector,#tama, #hanayo,#midoriko)')", "':not(.selector, #tama, #hanayo, #midoriko)'"); |
| shouldBe("setThenReadSelectorText(':not( .name,#ok,:visited )')", "':not(.name, #ok, :visited)'"); |
| shouldBe("setThenReadSelectorText(':not( .name,#ok, :visited, :link)')", "':not(.name, #ok, :visited, :link)'"); |
| shouldBe("setThenReadSelectorText(':not( .name,#ok, :not(:visited ))')", "':not(.name, #ok, :not(:visited))'"); |
| shouldBe("setThenReadSelectorText(':not(.name, #ok,:not(:link))')", "':not(.name, #ok, :not(:link))'"); |
| shouldBe("setThenReadSelectorText(':not(.name,#ok,:not(:link))')", "':not(.name, #ok, :not(:link))'"); |
| shouldBe("setThenReadSelectorText(':not( .name,#ok,:-webkit-any( hello))')", "':not(.name, #ok, :-webkit-any(hello))'"); |
| shouldBe("setThenReadSelectorText(':not( .name,#ok, :-webkit-any(.selector, #tama, #hanayo, #midoriko))')", "':not(.name, #ok, :-webkit-any(.selector, #tama, #hanayo, #midoriko))'"); |
| shouldBe("setThenReadSelectorText(':not( [type=\"file\"])')", "':not([type=\"file\"])'"); |
| shouldBe("setThenReadSelectorText(':not( :hover )')", "':not(:hover)'"); |
| shouldBe("setThenReadSelectorText('input:not([type=\"file\"],:hover,:focus):enabled')", "'input:not([type=\"file\"], :hover, :focus):enabled'"); |
| shouldBe("setThenReadSelectorText(':not(input[type=\"file\"], a:hover, button:focus)')", "':not(input[type=\"file\"], a:hover, button:focus)'"); |
| shouldBe("setThenReadSelectorText(':not( .class1.class2.class3 )')", "':not(.class1.class2.class3)'"); |
| shouldBe("setThenReadSelectorText(':not(.class1:hover )')", "':not(.class1:hover)'"); |
| shouldBe("setThenReadSelectorText(':not(a.class1.class2.class3:hover )')", "':not(a.class1.class2.class3:hover)'"); |
| shouldBe("setThenReadSelectorText(':not(:matches(single ),:matches(a,b ,p),:matches(#alice, #bob,#chris))')", "':not(:matches(single), :matches(a, b, p), :matches(#alice, #bob, #chris))'"); |
| |
| debug(''); |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |