Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: LayoutTests/inspector/elements/styles/stylesheet-source-url-comment.html

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/elements/styles/styles-test.js ('k') | LayoutTests/inspector/elements/styles/undo-add-new-rule.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698