Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: LayoutTests/fast/dom/shadow/content-selector-query.html

Issue 279763002: Support a negation pseudo-class, :not(), in <content select> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/content-selector-query-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p>This test checks select attribute of content element is valid.</p> 7 <p>This test checks select attribute of content element is valid.</p>
8 <pre id="console"></pre> 8 <pre id="console"></pre>
9 <div id="container"></div> 9 <div id="container"></div>
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 var dataOfValidCases = [ 27 var dataOfValidCases = [
28 null, '', 28 null, '',
29 'ns|div', '*|div', '|div', 'div', 29 'ns|div', '*|div', '|div', 'div',
30 'ns|*', '*|*', '|*', '*', 30 'ns|*', '*|*', '|*', '*',
31 '.elem', 'p.elem', 'foo.elem', '*.right', 31 '.elem', 'p.elem', 'foo.elem', '*.right',
32 '#elem', 'p#elem', 'foo#elem', '*#something', 32 '#elem', 'p#elem', 'foo#elem', '*#something',
33 'div[title]', 'div[class="example"]', 'div[hello="Cleveland"][goodbye="Colum bus"]', 33 'div[title]', 'div[class="example"]', 'div[hello="Cleveland"][goodbye="Colum bus"]',
34 'div[rel~="copyright"]', 'div[href="http://www.example.com/"]', 34 'div[rel~="copyright"]', 'div[href="http://www.example.com/"]',
35 'div[hreflang|="en"]', 'div[character=romeo]', 35 'div[hreflang|="en"]', 'div[character=romeo]',
36 'div, div', ' div, div ',
37 'div:not(div)',
38 ];
39
40 var dataOfInvalidCases = [
41 'div div', 'div > div', 'div + div', 'div ~ div',
42 'div:root', 'div:lang(en)',
43 'div::before', 'div::after', 'div::first-line', 'div::first-letter',
44 'div:active', 'div:hover', 'div:focus',
45 'div div:not(div)', 'div:not(div) div', 'div span div',
46 'div < div', 'div - dvi', '< div', '+div', '~div', 'div:!', '!:!', 'div::!', 'div::first_of_type',
47 'pe;ro', '@screen', '@import "style.css"', 'div :first-of-type', 'div::first -of-type',
48 ' div, ,div', 'div \'\'',
49 'div:link', 'div:visited', 'div:target', 'div:enabled', 'div:checked',
50 'div:indeterminate', 'div:nth-child(1)', 'div:nth-last-child(1)', 'div:nth-o f-type(1)',
51 'div:nth-last-of-type(1)', 'div:first-child', 'div:last-child', 'div:first-o f-type',
52 'div:last-of-type', 'div:only-of-type',
53 'div:first-of-type:last-of-type', 'div.elem:visited', '*:visited',
54 'div:first-of-type, div', 'div, div:first-of-type', 'div:first-of-type, div: last-of-type',
55 ];
56
57 var dataOfValidCasesIfPseudoClassIsAllowed = [
58 null, '',
59 'ns|div', '*|div', '|div', 'div',
60 'ns|*', '*|*', '|*', '*',
61 '.elem', 'p.elem', 'foo.elem', '*.right',
62 '#elem', 'p#elem', 'foo#elem', '*#something',
63 'div[title]', 'div[class="example"]', 'div[hello="Cleveland"][goodbye="Colum bus"]',
64 'div[rel~="copyright"]', 'div[href="http://www.example.com/"]',
65 'div[hreflang|="en"]', 'div[character=romeo]',
36 'div:link', 'div:visited', 'div:target', 'div:enabled', 'div:checked', 66 'div:link', 'div:visited', 'div:target', 'div:enabled', 'div:checked',
37 'div:indeterminate', 'div:nth-child(1)', 'div:nth-last-child(1)', 'div:nth-o f-type(1)', 67 'div:indeterminate', 'div:nth-child(1)', 'div:nth-last-child(1)', 'div:nth-o f-type(1)',
38 'div:nth-last-of-type(1)', 'div:first-child', 'div:last-child', 'div:first-o f-type', 68 'div:nth-last-of-type(1)', 'div:first-child', 'div:last-child', 'div:first-o f-type',
39 'div:last-of-type', 'div:only-of-type', 69 'div:last-of-type', 'div:only-of-type',
40 'div:first-of-type:last-of-type', 'div.elem:visited', '*:visited', 70 'div:first-of-type:last-of-type', 'div.elem:visited', '*:visited',
41 'div, div', 'div:first-of-type, div', 'div, div:first-of-type', 'div:first-o f-type, div:last-of-type', 71 'div:first-of-type, div', 'div, div:first-of-type', 'div:first-of-type, div: last-of-type',
42 ' div, div ', 72 'div, div', ' div, div ',
73 'div:not(div)',
43 ]; 74 ];
44 75
45 var dataOfInvalidCases = [ 76 var dataOfInvalidCasesIfPseudoClassIsAllowed = [
46 'div div', 'div > div', 'div + div', 'div ~ div', 77 'div div', 'div > div', 'div + div', 'div ~ div',
47 'div:not(div)', 'div:root', 'div:lang(en)', 78 'div:root', 'div:lang(en)',
48 'div::before', 'div::after', 'div::first-line', 'div::first-letter', 79 'div::before', 'div::after', 'div::first-line', 'div::first-letter',
49 'div:active', 'div:hover', 'div:focus', 80 'div:active', 'div:hover', 'div:focus',
50 'div div:not(div)', 'div:not(div) div', 'div span div', 81 'div div:not(div)', 'div:not(div) div', 'div span div',
51 'div < div', 'div - dvi', '< div', '+div', '~div', 'div:!', '!:!', 'div::!', 'div::first_of_type', 82 'div < div', 'div - dvi', '< div', '+div', '~div', 'div:!', '!:!', 'div::!', 'div::first_of_type',
52 'pe;ro', '@screen', '@import "style.css"', 'div :first-of-type', 'div::first -of-type', 83 'pe;ro', '@screen', '@import "style.css"', 'div :first-of-type', 'div::first -of-type',
53 ' div, ,div', 'div \'\'' 84 ' div, ,div', 'div \'\''
54 ] 85 ]
55 86
56 function doTest() { 87 function doTest() {
57 if (!window.testRunner || !window.internals) { 88 if (!window.testRunner || !window.internals) {
58 return; 89 return;
59 } 90 }
60 91
61 testRunner.dumpAsText(); 92 testRunner.dumpAsText();
62 93
94 if (window.internals) {
95 internals.settings.setPseudoClassesInMatchingCriteriaInAuthorShadowTrees Enabled(false);
96 }
63 for (var i = 0; i < dataOfValidCases.length; ++i) { 97 for (var i = 0; i < dataOfValidCases.length; ++i) {
64 test(dataOfValidCases[i], true); 98 test(dataOfValidCases[i], true);
65 } 99 }
66 for (var i = 0; i < dataOfInvalidCases.length; ++i) { 100 for (var i = 0; i < dataOfInvalidCases.length; ++i) {
67 test(dataOfInvalidCases[i], false); 101 test(dataOfInvalidCases[i], false);
102 }
103
104 if (window.internals) {
105 internals.settings.setPseudoClassesInMatchingCriteriaInAuthorShadowTrees Enabled(true);
106 }
107 for (var i = 0; i < dataOfValidCasesIfPseudoClassIsAllowed.length; ++i) {
108 test(dataOfValidCases[i], true);
109 }
110 for (var i = 0; i < dataOfInvalidCasesIfPseudoClassIsAllowed.length; ++i) {
111 test(dataOfInvalidCases[i], false);
68 } 112 }
69 } 113 }
70 114
71 doTest(); 115 doTest();
72 var successfullyParsed = true; 116 var successfullyParsed = true;
73 </script> 117 </script>
74 </body> 118 </body>
75 </html> 119 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/content-selector-query-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698