| 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/debugger-test.js"></script> | 4 <script src="../../http/tests/inspector/debugger-test.js"></script> |
| 5 <style> | 5 <style> |
| 6 body { | 6 body { |
| 7 color: green; | 7 color: green; |
| 8 } | 8 } |
| 9 | 9 |
| 10 /*@ sourceURL=inlineStyleSheet.css */ | 10 /*# sourceURL=inlineStyleSheet.css */ |
| 11 </style> | 11 </style> |
| 12 <script> | 12 <script> |
| 13 function addInlineStyleSheet() | 13 function addInlineStyleSheet() |
| 14 { | 14 { |
| 15 var styleElement = document.createElement("style"); | 15 var styleElement = document.createElement("style"); |
| 16 styleElement.textContent = "body { color: black; }\n/*@ sourceURL=css/addedI
nlineStylesheet.css */"; | 16 styleElement.textContent = "body { color: black; }\n/*# sourceURL=css/addedI
nlineStylesheet.css */"; |
| 17 document.head.appendChild(styleElement); | 17 document.head.appendChild(styleElement); |
| 18 } | 18 } |
| 19 | 19 |
| 20 function addInlineStyleSheetNonRelative() | 20 function addInlineStyleSheetNonRelative() |
| 21 { | 21 { |
| 22 var styleElement = document.createElement("style"); | 22 var styleElement = document.createElement("style"); |
| 23 styleElement.textContent = "body { color: red; }\n/*@ sourceURL=/css/nonRela
tiveInlineStylesheet.css */"; | 23 styleElement.textContent = "body { color: red; }\n/*# sourceURL=/css/nonRela
tiveInlineStylesheet.css */"; |
| 24 document.head.appendChild(styleElement); | 24 document.head.appendChild(styleElement); |
| 25 } | 25 } |
| 26 | 26 |
| 27 function test() | 27 function test() |
| 28 { | 28 { |
| 29 function forEachHeaderMatchingURL(url, handler) | 29 function forEachHeaderMatchingURL(url, handler) |
| 30 { | 30 { |
| 31 var headers = WebInspector.cssModel.styleSheetHeaders(); | 31 var headers = WebInspector.cssModel.styleSheetHeaders(); |
| 32 for (var i = 0; i < headers.length; ++i) { | 32 for (var i = 0; i < headers.length; ++i) { |
| 33 if (headers[i].sourceURL.indexOf(url) !== -1) | 33 if (headers[i].sourceURL.indexOf(url) !== -1) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 </script> | 88 </script> |
| 89 | 89 |
| 90 </head> | 90 </head> |
| 91 | 91 |
| 92 <body onload="runTest()"> | 92 <body onload="runTest()"> |
| 93 <p>Tests that stylesheets with sourceURL comment are shown in the Sources panel.
</p> | 93 <p>Tests that stylesheets with sourceURL comment are shown in the Sources panel.
</p> |
| 94 </body> | 94 </body> |
| 95 </html> | 95 </html> |
| OLD | NEW |