| 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 | 6 |
| 7 function embedInlineStyleSheet() | 7 function embedInlineStyleSheet() |
| 8 { | 8 { |
| 9 var style = document.createElement("style"); | 9 var style = document.createElement("style"); |
| 10 style.type = "text/css"; | 10 style.type = "text/css"; |
| 11 style.textContent = document.querySelector(".stylesheet-text").textContent; | 11 style.textContent = document.querySelector(".stylesheet-text").textContent; |
| 12 document.head.appendChild(style); | 12 document.head.appendChild(style); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function test() | 15 function test() |
| 16 { | 16 { |
| 17 WebInspector.targetManager.addModelListener(WebInspector.CSSModel, WebInspec
tor.CSSModel.Events.StyleSheetAdded, onStyleSheetAdded); | 17 SDK.targetManager.addModelListener(SDK.CSSModel, SDK.CSSModel.Events.StyleSh
eetAdded, onStyleSheetAdded); |
| 18 InspectorTest.evaluateInPage("embedInlineStyleSheet()", function() { }); | 18 InspectorTest.evaluateInPage("embedInlineStyleSheet()", function() { }); |
| 19 | 19 |
| 20 function onStyleSheetAdded(event) | 20 function onStyleSheetAdded(event) |
| 21 { | 21 { |
| 22 var header = event.data; | 22 var header = event.data; |
| 23 | 23 |
| 24 InspectorTest.addResult("\nheader.sourceMapURL = " + header.sourceMapURL
); | 24 InspectorTest.addResult("\nheader.sourceMapURL = " + header.sourceMapURL
); |
| 25 InspectorTest.completeTest(); | 25 InspectorTest.completeTest(); |
| 26 } | 26 } |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 </script> | 29 </script> |
| 30 | 30 |
| 31 </head> | 31 </head> |
| 32 | 32 |
| 33 <body onload="runTest()"> | 33 <body onload="runTest()"> |
| 34 <p>Verify that inline style sourceMappingURL is resolved properly.</p> | 34 <p>Verify that inline style sourceMappingURL is resolved properly.</p> |
| 35 <pre class="stylesheet-text">.red,body{color:red}body{background-color:red} | 35 <pre class="stylesheet-text">.red,body{color:red}body{background-color:red} |
| 36 /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj
pbIm1peGluLmxlc3MiLCJ0ZXN0Lmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsS0NJQS
xLREhFLE1BQUEsSUNHRixLQUVFLGlCQUFBIn0=*/</pre> | 36 /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj
pbIm1peGluLmxlc3MiLCJ0ZXN0Lmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsS0NJQS
xLREhFLE1BQUEsSUNHRixLQUVFLGlCQUFBIn0=*/</pre> |
| 37 | 37 |
| 38 </body> | 38 </body> |
| 39 </html> | 39 </html> |
| OLD | NEW |