| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector/inspector-test.js"></script> | 3 <script src="../inspector/inspector-test.js"></script> |
| 4 <script src="../inspector/elements-test.js"></script> | 4 <script src="../inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function createShadowRoot() | 7 function createShadowRoot() |
| 8 { | 8 { |
| 9 if (window.testRunner) | 9 if (window.testRunner) |
| 10 testRunner.waitUntilDone(); | 10 testRunner.waitUntilDone(); |
| 11 var template = document.querySelector('#tmpl'); | 11 var template = document.querySelector('#tmpl'); |
| 12 var root = document.querySelector('#host').createShadowRoot(); | 12 var root = document.querySelector('#host').webkitCreateShadowRoot(); |
| 13 root.appendChild(template.content.cloneNode(true)); | 13 root.appendChild(template.content.cloneNode(true)); |
| 14 if (window.testRunner) | 14 if (window.testRunner) |
| 15 testRunner.showWebInspector(); | 15 testRunner.showWebInspector(); |
| 16 runTest(); | 16 runTest(); |
| 17 } | 17 } |
| 18 | 18 |
| 19 function test() | 19 function test() |
| 20 { | 20 { |
| 21 InspectorTest.runTestSuite([ | 21 InspectorTest.runTestSuite([ |
| 22 function testInit(next) | 22 function testInit(next) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 This test checks that style sheets hosted inside shadow roots | 39 This test checks that style sheets hosted inside shadow roots |
| 40 could be inspected. | 40 could be inspected. |
| 41 </p> | 41 </p> |
| 42 <div id="host"></div> | 42 <div id="host"></div> |
| 43 <template id="tmpl"> | 43 <template id="tmpl"> |
| 44 <style> .red { color: red; } </style> | 44 <style> .red { color: red; } </style> |
| 45 <div id="inner" class="red">hi!</div> | 45 <div id="inner" class="red">hi!</div> |
| 46 </template> | 46 </template> |
| 47 </body> | 47 </body> |
| 48 </html> | 48 </html> |
| OLD | NEW |