OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test for WebKit bug 78595: CollectingRules and QueryingRules modes of
SelectorChecker miss some complex selectors with pseudo elements</title> | 4 <title>Test for WebKit bug 78595: CollectingRules and QueryingRules modes of
SelectorChecker miss some complex selectors with pseudo elements</title> |
5 <style type="text/css"> | 5 <style type="text/css"> |
6 .parent.secondParent .firstChild:before { | 6 .parent.secondParent .firstChild:before { |
7 color: brown; | 7 color: brown; |
8 content: "brown"; | 8 content: "brown"; |
9 } | 9 } |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 .fail { | 50 .fail { |
51 color: red; | 51 color: red; |
52 } | 52 } |
53 | 53 |
54 </style> | 54 </style> |
55 <script type="text/javascript"> | 55 <script type="text/javascript"> |
56 if (window.testRunner) | 56 if (window.testRunner) |
57 testRunner.dumpAsText(); | 57 testRunner.dumpAsText(); |
58 | 58 |
59 var tests = [ | 59 var tests = [ |
60 { 'elementId' : 'firstChild', 'expectedValue' : 'rgb(165, 42, 42)' }, | 60 { 'elementId' : 'firstChild', 'expectedValue' : 'brown' }, |
61 { 'elementId' : 'secondChild', 'expectedValue' : 'rgb(0, 255, 255)' }, | 61 { 'elementId' : 'secondChild', 'expectedValue' : 'cyan' }, |
62 { 'elementId' : 'thirdChild', 'expectedValue' : 'red' }, | 62 { 'elementId' : 'thirdChild', 'expectedValue' : 'red' }, |
63 { 'elementId' : 'fourthChild', 'expectedValue' : 'rgb(255, 0, 255)' }, | 63 { 'elementId' : 'fourthChild', 'expectedValue' : 'magenta' }, |
64 { 'elementId' : 'firstParent', 'expectedValue' : 'green' }, | 64 { 'elementId' : 'firstParent', 'expectedValue' : 'green' }, |
65 { 'elementId' : 'secondParent', 'expectedValue' : 'lime' }, | 65 { 'elementId' : 'secondParent', 'expectedValue' : 'lime' }, |
66 { 'elementId' : 'thirdParent', 'expectedValue' : 'blue' }, | 66 { 'elementId' : 'thirdParent', 'expectedValue' : 'blue' }, |
67 { 'elementId' : 'fourthParent', 'expectedValue' : 'rgb(220, 20, 60)' }, | 67 { 'elementId' : 'fourthParent', 'expectedValue' : 'crimson' }, |
68 ]; | 68 ]; |
69 | 69 |
70 function runTests() | 70 function runTests() |
71 { | 71 { |
72 var resultsElement = document.getElementById('results'); | 72 var resultsElement = document.getElementById('results'); |
73 | 73 |
74 tests.forEach(function(curTest) { | 74 tests.forEach(function(curTest) { |
75 var msg = document.createElement('div'); | 75 var msg = document.createElement('div'); |
76 var element = document.querySelector("#" + curTest.elementId); | 76 var element = document.querySelector("#" + curTest.elementId); |
77 | 77 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 <div class="thirdChild" id="thirdChild"></div> | 116 <div class="thirdChild" id="thirdChild"></div> |
117 <div class="fourthChild" id="fourthChild"></div> | 117 <div class="fourthChild" id="fourthChild"></div> |
118 </div> | 118 </div> |
119 <div class="parent thirdParent" id="thirdParent"></div> | 119 <div class="parent thirdParent" id="thirdParent"></div> |
120 <div class="parent fourthParent" id="fourthParent"></div> | 120 <div class="parent fourthParent" id="fourthParent"></div> |
121 </div> | 121 </div> |
122 <br /> | 122 <br /> |
123 <div id="results"></div> | 123 <div id="results"></div> |
124 </body> | 124 </body> |
125 </html> | 125 </html> |
OLD | NEW |