| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../inspector-test.js"></script> |
| 4 <script src="./bindings-test.js"></script> |
| 5 |
| 6 <script> |
| 7 |
| 8 async function test() |
| 9 { |
| 10 var sourcesNavigator = new Sources.SourcesNavigatorView(); |
| 11 sourcesNavigator.show(UI.inspectorView.element); |
| 12 |
| 13 InspectorTest.markStep('dumpInitialNavigator'); |
| 14 InspectorTest.dumpNavigatorView(sourcesNavigator, false); |
| 15 |
| 16 InspectorTest.markStep('attachShadow1'); |
| 17 await Promise.all([ |
| 18 InspectorTest.attachShadowDOM('shadow1', '#template'), |
| 19 InspectorTest.waitForSourceMap('sourcemap-script.js.map'), |
| 20 InspectorTest.waitForSourceMap('sourcemap-style.css.map'), |
| 21 ]); |
| 22 InspectorTest.dumpNavigatorView(sourcesNavigator, false); |
| 23 |
| 24 InspectorTest.markStep('attachShadow2'); |
| 25 await Promise.all([ |
| 26 InspectorTest.attachShadowDOM('shadow2', '#template'), |
| 27 InspectorTest.waitForSourceMap('sourcemap-script.js.map'), |
| 28 InspectorTest.waitForSourceMap('sourcemap-style.css.map'), |
| 29 ]); |
| 30 InspectorTest.dumpNavigatorView(sourcesNavigator, false); |
| 31 |
| 32 InspectorTest.markStep('detachShadow1'); |
| 33 await Promise.all([ |
| 34 InspectorTest.detachShadowDOM('shadow1'), |
| 35 InspectorTest.waitForStyleSheetRemoved('sourcemap-style.css'), |
| 36 ]); |
| 37 InspectorTest.dumpNavigatorView(sourcesNavigator, false); |
| 38 |
| 39 InspectorTest.markStep('detachShadow2'); |
| 40 await Promise.all([ |
| 41 InspectorTest.detachShadowDOM('shadow2'), |
| 42 InspectorTest.waitForStyleSheetRemoved('sourcemap-style.css'), |
| 43 ]); |
| 44 InspectorTest.dumpNavigatorView(sourcesNavigator, false); |
| 45 |
| 46 InspectorTest.completeTest(); |
| 47 } |
| 48 |
| 49 </script> |
| 50 |
| 51 </head> |
| 52 <body onload="runTest()"> |
| 53 <p> |
| 54 Verify that navigator shows proper UISourceCodes as shadow dom |
| 55 styles and scripts are added and removed. |
| 56 </p> |
| 57 |
| 58 <template id='template'> |
| 59 <style>div { |
| 60 color: blue; |
| 61 } |
| 62 /*# sourceURL=sourcemap-style.css */ |
| 63 /*# sourceMappingURL=resources/sourcemap-style.css.map */ |
| 64 </style> |
| 65 <script>window.foo = console.log.bind(console, 'foo'); |
| 66 //# sourceURL=sourcemap-script.js |
| 67 //# sourceMappingURL=resources/sourcemap-script.js.map |
| 68 </script> |
| 69 <p>Hi! I'm ShadowDOM v1!</p> |
| 70 </template> |
| 71 |
| 72 </body> |
| 73 </html> |
| OLD | NEW |