| OLD | NEW |
| 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 <!-- Description and console is hidden until the test ends so that the content o
f the console cannot be searchable. --> | 7 <!-- Description and console is hidden until the test ends so that the content o
f the console cannot be searchable. --> |
| 8 <p id="description" style="visibility: hidden;"></p> | 8 <p id="description" style="visibility: hidden;"></p> |
| 9 <pre id="console" style="visibility: hidden;"></pre> | 9 <pre id="console" style="visibility: hidden;"></pre> |
| 10 <script> | 10 <script> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 document.getElementById('host').createShadowRoot().innerHTML = '<span>BEFORE
<content></content>AFTER</span>'; | 106 document.getElementById('host').createShadowRoot().innerHTML = '<span>BEFORE
<content></content>AFTER</span>'; |
| 107 | 107 |
| 108 var selection = getSelection(); | 108 var selection = getSelection(); |
| 109 selection.empty(); | 109 selection.empty(); |
| 110 shouldBeTrue('testRunner.findString("BEFORE", [])'); | 110 shouldBeTrue('testRunner.findString("BEFORE", [])'); |
| 111 selection.empty(); | 111 selection.empty(); |
| 112 shouldBeTrue('testRunner.findString("DOCUMENT", [])'); | 112 shouldBeTrue('testRunner.findString("DOCUMENT", [])'); |
| 113 selection.empty(); | 113 selection.empty(); |
| 114 shouldBeTrue('testRunner.findString("AFTER", [])'); | 114 shouldBeTrue('testRunner.findString("AFTER", [])'); |
| 115 selection.empty(); | 115 selection.empty(); |
| 116 shouldBeTrue('testRunner.findString("BEFOREDOCUMENTAFTER", [])'); // Visited
in composed tree order | 116 shouldBeTrue('testRunner.findString("BEFOREDOCUMENTAFTER", [])'); // Visited
in flat tree order |
| 117 selection.empty(); | 117 selection.empty(); |
| 118 shouldBeFalse('testRunner.findString("DOCUMENTBEFORE", [])'); | 118 shouldBeFalse('testRunner.findString("DOCUMENTBEFORE", [])'); |
| 119 selection.empty(); | 119 selection.empty(); |
| 120 shouldBeFalse('testRunner.findString("AFTERDOCUMENT", [])'); | 120 shouldBeFalse('testRunner.findString("AFTERDOCUMENT", [])'); |
| 121 | 121 |
| 122 document.body.removeChild(container); | 122 document.body.removeChild(container); |
| 123 debug('Finished testDistribution().\n'); | 123 debug('Finished testDistribution().\n'); |
| 124 } | 124 } |
| 125 | 125 |
| 126 if (window.testRunner) { | 126 if (window.testRunner) { |
| 127 testSimpleShadow(); | 127 testSimpleShadow(); |
| 128 testMultipleShadows(); | 128 testMultipleShadows(); |
| 129 testNestedShadows(); | 129 testNestedShadows(); |
| 130 testDistribution(); | 130 testDistribution(); |
| 131 } else { | 131 } else { |
| 132 testFailed('This test requires testRunner.'); | 132 testFailed('This test requires testRunner.'); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // Post-test clean-up. | 135 // Post-test clean-up. |
| 136 document.getElementById('description').style.removeProperty('visibility'); | 136 document.getElementById('description').style.removeProperty('visibility'); |
| 137 document.getElementById('console').style.removeProperty('visibility'); | 137 document.getElementById('console').style.removeProperty('visibility'); |
| 138 </script> | 138 </script> |
| 139 </body> | 139 </body> |
| 140 </html> | 140 </html> |
| OLD | NEW |