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

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

Issue 2403563002: DevTools: fix sourceMapURL for inline stylesheets (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap.html b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap.html
new file mode 100644
index 0000000000000000000000000000000000000000..e88ae135f17b37ba4e8ba11048ecb22af3e4b338
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-4/inline-style-sourcemap.html
@@ -0,0 +1,39 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/elements-test.js"></script>
+<script>
+
+function embedInlineStyleSheet()
+{
+ var style = document.createElement("style");
+ style.type = "text/css";
+ style.textContent = document.querySelector(".stylesheet-text").textContent;
+ document.head.appendChild(style);
+}
+
+function test()
+{
+ WebInspector.targetManager.addModelListener(WebInspector.CSSModel, WebInspector.CSSModel.Events.StyleSheetAdded, onStyleSheetAdded);
+ InspectorTest.evaluateInPage("embedInlineStyleSheet()", function() { });
+
+ function onStyleSheetAdded(event)
+ {
+ var header = event.data;
+
+ InspectorTest.addResult("\nheader.sourceMapURL = " + header.sourceMapURL);
+ InspectorTest.completeTest();
+ }
+};
+
+</script>
+
+</head>
+
+<body onload="runTest()">
+<p>Verify that inline style sourceMappingURL is resolved properly.</p>
+<pre class="stylesheet-text">.red,body{color:red}body{background-color:red}
+/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1peGluLmxlc3MiLCJ0ZXN0Lmxlc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsS0NJQSxLREhFLE1BQUEsSUNHRixLQUVFLGlCQUFBIn0=*/</pre>
+
+</body>
+</html>
« 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