OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 3 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 4 <script> |
| 5 function addShadow() { |
| 6 var root = host.attachShadow({mode:"open"}); |
| 7 root.innerHTML = '<link rel="stylesheet" href="data:text/css,#x{color:pink}"
>'; |
| 8 } |
| 9 |
| 10 function test() { |
| 11 InspectorTest.cssModel.addEventListener(SDK.CSSModel.Events.StyleSheetAdded,
sheetAdded); |
| 12 InspectorTest.cssModel.addEventListener(SDK.CSSModel.Events.StyleSheetRemove
d, sheetRemoved); |
| 13 InspectorTest.evaluateInPage("addShadow()"); |
| 14 |
| 15 function sheetAdded(event) { |
| 16 InspectorTest.addResult("Sheet added: "+event.data.sourceURL); |
| 17 InspectorTest.evaluateInPage("host.remove()"); |
| 18 } |
| 19 |
| 20 function sheetRemoved(event) { |
| 21 InspectorTest.addResult("Sheet removed: "+event.data.sourceURL); |
| 22 InspectorTest.completeTest(); |
| 23 } |
| 24 } |
| 25 </script> |
| 26 <body onload="runTest()"> |
| 27 <div id="host"></div> |
| 28 |
OLD | NEW |