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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap.html

Issue 2545883005: DevTools: support sourceMappingURL for the inline stylesheets (Closed)
Patch Set: address comments Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 SDK.targetManager.addModelListener(SDK.CSSModel, SDK.CSSModel.Events.StyleSh eetAdded, onStyleSheetAdded); 17 SDK.targetManager.addModelListener(SDK.CSSModel, SDK.CSSModel.Events.StyleSh eetAdded, function() { });
18 InspectorTest.evaluateInPage("embedInlineStyleSheet()", function() { }); 18 InspectorTest.evaluateInPage("embedInlineStyleSheet()", onEvaluated);
19 19
20 function onStyleSheetAdded(event) 20 function onEvaluated() {
21 { 21 InspectorTest.selectNodeAndWaitForStyles("inspect", onSelected);
22 var header = event.data; 22 }
23 23
24 InspectorTest.addResult("\nheader.sourceMapURL = " + header.sourceMapURL ); 24 function onSelected() {
25 InspectorTest.dumpSelectedElementStyles(true, false, false);
25 InspectorTest.completeTest(); 26 InspectorTest.completeTest();
26 } 27 }
27 }; 28 };
28 29
29 </script> 30 </script>
30 31
31 </head> 32 </head>
32 33
33 <body onload="runTest()"> 34 <body id="inspect" onload="runTest()">
34 <p>Verify that inline style sourceMappingURL is resolved properly.</p> 35 <p>Verify that inline style sourceMappingURL is resolved properly.</p>
35 <pre class="stylesheet-text">.red,body{color:red}body{background-color:red} 36 <pre class="stylesheet-text">.red,body{color:red}body{background-color:red}
36 /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj pbIm1peGluLmxlc3MiLCJ0ZXN0Lmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsS0NJQS xLREhFLE1BQUEsSUNHRixLQUVFLGlCQUFBIn0=*/</pre> 37 /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj pbIm1peGluLmxlc3MiLCJ0ZXN0Lmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsS0NJQS xLREhFLE1BQUEsSUNHRixLQUVFLGlCQUFBIn0=*/</pre>
37 38
38 </body> 39 </body>
39 </html> 40 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698