| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script> |
| 5 |
| 6 function test() |
| 7 { |
| 8 InspectorTest.sendCommand("DOM.enable", {}); |
| 9 InspectorTest.sendCommandOrDie("DOM.getFlatDocument", {"depth": -1, "pierce"
: true}, onDocument); |
| 10 |
| 11 function onDocument(response) { |
| 12 // The frameIds change each run. |
| 13 for (var i = 0; i < response.nodes.length; i++) { |
| 14 if ("frameId" in response.nodes[i]) |
| 15 response.nodes[i].frameId = "?"; |
| 16 } |
| 17 InspectorTest.log(JSON.stringify(response, null, 2)); |
| 18 InspectorTest.completeTest(); |
| 19 } |
| 20 } |
| 21 |
| 22 </script> |
| 23 <template id="shadow-template"> |
| 24 <style> |
| 25 :host { |
| 26 color: red; |
| 27 } |
| 28 </style> |
| 29 <div></div><h1>Hi from a template!</h1></div> |
| 30 </template> |
| 31 </head> |
| 32 <body class="body-class"> |
| 33 <div id="A"> A |
| 34 <div id="B"> B |
| 35 <div id="C"> C |
| 36 <div id="D"> D |
| 37 <div id="E"> E |
| 38 </div> |
| 39 </div> |
| 40 </div> |
| 41 </div> |
| 42 </div> |
| 43 |
| 44 <iframe src="../dom/resources/simple-iframe.html" width="400" height="200"><
/iframe> |
| 45 <div id="shadow-host"></div> |
| 46 <script type="text/javascript"> |
| 47 var host = document.querySelector("#shadow-host").createShadowRoot(); |
| 48 var template = document.querySelector("#shadow-template"); |
| 49 host.appendChild(template.content); |
| 50 template.remove(); |
| 51 window.onload = runTest; |
| 52 </script> |
| 53 </body> |
| 54 </html> |
| OLD | NEW |