| 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 */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 { | 28 { |
| 29 var styleElement = document.createElement("style"); | 29 var styleElement = document.createElement("style"); |
| 30 styleElement.textContent = "body { color: red; }\n/*# sourceURL=/css/nonRela
tiveInlineStylesheet.css */"; | 30 styleElement.textContent = "body { color: red; }\n/*# sourceURL=/css/nonRela
tiveInlineStylesheet.css */"; |
| 31 document.head.appendChild(styleElement); | 31 document.head.appendChild(styleElement); |
| 32 } | 32 } |
| 33 | 33 |
| 34 function test() | 34 function test() |
| 35 { | 35 { |
| 36 function forEachHeaderMatchingURL(url, handler) | 36 function forEachHeaderMatchingURL(url, handler) |
| 37 { | 37 { |
| 38 var headers = WebInspector.cssModel.styleSheetHeaders(); | 38 var headers = InspectorTest.cssModel.styleSheetHeaders(); |
| 39 for (var i = 0; i < headers.length; ++i) { | 39 for (var i = 0; i < headers.length; ++i) { |
| 40 if (headers[i].sourceURL.indexOf(url) !== -1) | 40 if (headers[i].sourceURL.indexOf(url) !== -1) |
| 41 handler(headers[i]); | 41 handler(headers[i]); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 function checkHeaderHasSourceURL(header) | 45 function checkHeaderHasSourceURL(header) |
| 46 { | 46 { |
| 47 InspectorTest.assertTrue(header.hasSourceURL); | 47 InspectorTest.assertTrue(header.hasSourceURL); |
| 48 } | 48 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 </script> | 108 </script> |
| 109 | 109 |
| 110 </head> | 110 </head> |
| 111 | 111 |
| 112 <body onload="runTest()"> | 112 <body onload="runTest()"> |
| 113 <p>Tests that stylesheets with sourceURL comment are shown in the Sources panel.
</p> | 113 <p>Tests that stylesheets with sourceURL comment are shown in the Sources panel.
</p> |
| 114 </body> | 114 </body> |
| 115 </html> | 115 </html> |
| OLD | NEW |