| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function updateShadowDOM() | 6 function updateShadowDOM() |
| 7 { | 7 { |
| 8 shadowRoot.removeChild(shadowRoot.firstChild); | 8 shadowRoot.removeChild(shadowRoot.firstChild); |
| 9 } | 9 } |
| 10 | 10 |
| 11 function initialize_shadowSettings() | |
| 12 { | |
| 13 WebInspector.settings.showShadowDOM.set(true); | |
| 14 } | |
| 15 | |
| 16 function test() | 11 function test() |
| 17 { | 12 { |
| 18 InspectorTest.expandElementsTree(function() { | 13 InspectorTest.expandElementsTree(function() { |
| 19 InspectorTest.evaluateInPage("updateShadowDOM()", function() { | 14 InspectorTest.evaluateInPage("updateShadowDOM()", function() { |
| 20 InspectorTest.expandElementsTree(function() { | 15 InspectorTest.expandElementsTree(function() { |
| 21 var containerElem = InspectorTest.expandedNodeWithId('container'
); | 16 var containerElem = InspectorTest.expandedNodeWithId('container'
); |
| 22 InspectorTest.dumpElementsTree(containerElem); | 17 InspectorTest.dumpElementsTree(containerElem); |
| 23 WebInspector.settings.showShadowDOM.set(false); | |
| 24 InspectorTest.completeTest(); | 18 InspectorTest.completeTest(); |
| 25 }); | 19 }); |
| 26 }); | 20 }); |
| 27 }); | 21 }); |
| 28 } | 22 } |
| 29 </script> | 23 </script> |
| 30 </head> | 24 </head> |
| 31 | 25 |
| 32 <body onload="runTest()"> | 26 <body onload="runTest()"> |
| 33 | 27 |
| 34 <p id="description">This test confirms that updating the shadow dom is reflected
to the Inspector.</p> | 28 <p id="description">This test confirms that updating the shadow dom is reflected
to the Inspector.</p> |
| 35 | 29 |
| 36 <div id="container"> | 30 <div id="container"> |
| 37 <div id="host"></div> | 31 <div id="host"></div> |
| 38 </div> | 32 </div> |
| 39 | 33 |
| 40 <script> | 34 <script> |
| 41 var shadowRoot = host.createShadowRoot(); | 35 var shadowRoot = host.createShadowRoot(); |
| 42 shadowRoot.innerHTML = "<div></div>"; | 36 shadowRoot.innerHTML = "<div></div>"; |
| 43 </script> | 37 </script> |
| 44 | 38 |
| 45 </body> | 39 </body> |
| 46 </html> | 40 </html> |
| OLD | NEW |