| Index: LayoutTests/fast/dom/shadow/content-selector-query.html
|
| diff --git a/LayoutTests/fast/dom/shadow/content-selector-query.html b/LayoutTests/fast/dom/shadow/content-selector-query.html
|
| index f9d7f70abc1bc41ecc6fb381212c1d26075ca50b..11c4010888c1b254e86a6c0b672251c1a654aa4a 100644
|
| --- a/LayoutTests/fast/dom/shadow/content-selector-query.html
|
| +++ b/LayoutTests/fast/dom/shadow/content-selector-query.html
|
| @@ -33,18 +33,49 @@ var dataOfValidCases = [
|
| 'div[title]', 'div[class="example"]', 'div[hello="Cleveland"][goodbye="Columbus"]',
|
| 'div[rel~="copyright"]', 'div[href="http://www.example.com/"]',
|
| 'div[hreflang|="en"]', 'div[character=romeo]',
|
| + 'div, div', ' div, div ',
|
| + 'div:not(div)',
|
| +];
|
| +
|
| +var dataOfInvalidCases = [
|
| + 'div div', 'div > div', 'div + div', 'div ~ div',
|
| + 'div:root', 'div:lang(en)',
|
| + 'div::before', 'div::after', 'div::first-line', 'div::first-letter',
|
| + 'div:active', 'div:hover', 'div:focus',
|
| + 'div div:not(div)', 'div:not(div) div', 'div span div',
|
| + 'div < div', 'div - dvi', '< div', '+div', '~div', 'div:!', '!:!', 'div::!', 'div::first_of_type',
|
| + 'pe;ro', '@screen', '@import "style.css"', 'div :first-of-type', 'div::first-of-type',
|
| + ' div, ,div', 'div \'\'',
|
| 'div:link', 'div:visited', 'div:target', 'div:enabled', 'div:checked',
|
| 'div:indeterminate', 'div:nth-child(1)', 'div:nth-last-child(1)', 'div:nth-of-type(1)',
|
| 'div:nth-last-of-type(1)', 'div:first-child', 'div:last-child', 'div:first-of-type',
|
| 'div:last-of-type', 'div:only-of-type',
|
| 'div:first-of-type:last-of-type', 'div.elem:visited', '*:visited',
|
| - 'div, div', 'div:first-of-type, div', 'div, div:first-of-type', 'div:first-of-type, div:last-of-type',
|
| - ' div, div ',
|
| + 'div:first-of-type, div', 'div, div:first-of-type', 'div:first-of-type, div:last-of-type',
|
| ];
|
|
|
| -var dataOfInvalidCases = [
|
| +var dataOfValidCasesIfPseudoClassIsAllowed = [
|
| + null, '',
|
| + 'ns|div', '*|div', '|div', 'div',
|
| + 'ns|*', '*|*', '|*', '*',
|
| + '.elem', 'p.elem', 'foo.elem', '*.right',
|
| + '#elem', 'p#elem', 'foo#elem', '*#something',
|
| + 'div[title]', 'div[class="example"]', 'div[hello="Cleveland"][goodbye="Columbus"]',
|
| + 'div[rel~="copyright"]', 'div[href="http://www.example.com/"]',
|
| + 'div[hreflang|="en"]', 'div[character=romeo]',
|
| + 'div:link', 'div:visited', 'div:target', 'div:enabled', 'div:checked',
|
| + 'div:indeterminate', 'div:nth-child(1)', 'div:nth-last-child(1)', 'div:nth-of-type(1)',
|
| + 'div:nth-last-of-type(1)', 'div:first-child', 'div:last-child', 'div:first-of-type',
|
| + 'div:last-of-type', 'div:only-of-type',
|
| + 'div:first-of-type:last-of-type', 'div.elem:visited', '*:visited',
|
| + 'div:first-of-type, div', 'div, div:first-of-type', 'div:first-of-type, div:last-of-type',
|
| + 'div, div', ' div, div ',
|
| + 'div:not(div)',
|
| +];
|
| +
|
| +var dataOfInvalidCasesIfPseudoClassIsAllowed = [
|
| 'div div', 'div > div', 'div + div', 'div ~ div',
|
| - 'div:not(div)', 'div:root', 'div:lang(en)',
|
| + 'div:root', 'div:lang(en)',
|
| 'div::before', 'div::after', 'div::first-line', 'div::first-letter',
|
| 'div:active', 'div:hover', 'div:focus',
|
| 'div div:not(div)', 'div:not(div) div', 'div span div',
|
| @@ -60,11 +91,24 @@ function doTest() {
|
|
|
| testRunner.dumpAsText();
|
|
|
| + if (window.internals) {
|
| + internals.settings.setPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled(false);
|
| + }
|
| for (var i = 0; i < dataOfValidCases.length; ++i) {
|
| - test(dataOfValidCases[i], true);
|
| + test(dataOfValidCases[i], true);
|
| }
|
| for (var i = 0; i < dataOfInvalidCases.length; ++i) {
|
| - test(dataOfInvalidCases[i], false);
|
| + test(dataOfInvalidCases[i], false);
|
| + }
|
| +
|
| + if (window.internals) {
|
| + internals.settings.setPseudoClassesInMatchingCriteriaInAuthorShadowTreesEnabled(true);
|
| + }
|
| + for (var i = 0; i < dataOfValidCasesIfPseudoClassIsAllowed.length; ++i) {
|
| + test(dataOfValidCases[i], true);
|
| + }
|
| + for (var i = 0; i < dataOfInvalidCasesIfPseudoClassIsAllowed.length; ++i) {
|
| + test(dataOfInvalidCases[i], false);
|
| }
|
| }
|
|
|
|
|