| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/inspector-protocol-test.js"></script> | |
| 4 <script> | |
| 5 | |
| 6 function test() | |
| 7 { | |
| 8 InspectorTest.sendCommand("DOM.enable", {}); | |
| 9 InspectorTest.sendCommandOrDie("DOM.getFlattenedDocument", {"depth": -1, "pi
erce": true}, onDocument); | |
| 10 | |
| 11 function onDocument(response) { | |
| 12 function stabilize(key, value) { | |
| 13 var unstableKeys = ["backendNodeId", "documentURL", "baseURL", "fram
eId"]; | |
| 14 if (unstableKeys.indexOf(key) !== -1) | |
| 15 return "<" + typeof(value) + ">"; | |
| 16 return value; | |
| 17 } | |
| 18 InspectorTest.log(JSON.stringify(response, stabilize, 2)); | |
| 19 InspectorTest.completeTest(); | |
| 20 } | |
| 21 } | |
| 22 | |
| 23 </script> | |
| 24 <template id="shadow-template"> | |
| 25 <style> | |
| 26 :host { | |
| 27 color: red; | |
| 28 } | |
| 29 </style> | |
| 30 <div></div><h1>Hi from a template!</h1></div> | |
| 31 </template> | |
| 32 </head> | |
| 33 <body class="body-class"> | |
| 34 <div id="A"> A | |
| 35 <div id="B"> B | |
| 36 <div id="C"> C | |
| 37 <div id="D"> D | |
| 38 <div id="E"> E | |
| 39 </div> | |
| 40 </div> | |
| 41 </div> | |
| 42 </div> | |
| 43 </div> | |
| 44 | |
| 45 <iframe src="../dom/resources/simple-iframe.html" width="400" height="200"><
/iframe> | |
| 46 <div id="shadow-host"></div> | |
| 47 <script type="text/javascript"> | |
| 48 var host = document.querySelector("#shadow-host").createShadowRoot(); | |
| 49 var template = document.querySelector("#shadow-template"); | |
| 50 host.appendChild(template.content); | |
| 51 template.remove(); | |
| 52 window.onload = runTest; | |
| 53 </script> | |
| 54 </body> | |
| 55 </html> | |
| OLD | NEW |