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

Unified Diff: LayoutTests/inspector/styles/stylesheet-source-url-comment.html

Issue 15832007: DevTools: Add support for //# sourceURL (sourceMappingURL) comments and deprecate //@ ones (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 6 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
Index: LayoutTests/inspector/styles/stylesheet-source-url-comment.html
diff --git a/LayoutTests/inspector/styles/stylesheet-source-url-comment.html b/LayoutTests/inspector/styles/stylesheet-source-url-comment.html
index 902242572e1176ba34c2a3e938590f936d1d47a5..bfa4aa3aec08b21774dc7eb276159284dcf5d0b0 100644
--- a/LayoutTests/inspector/styles/stylesheet-source-url-comment.html
+++ b/LayoutTests/inspector/styles/stylesheet-source-url-comment.html
@@ -7,20 +7,27 @@ body {
color: green;
}
-/*@ sourceURL=inlineStyleSheet.css */
+/*# sourceURL=inlineStyleSheet.css */
</style>
<script>
function addInlineStyleSheet()
{
var styleElement = document.createElement("style");
- styleElement.textContent = "body { color: black; }\n/*@ sourceURL=css/addedInlineStylesheet.css */";
+ styleElement.textContent = "body { color: black; }\n/*# sourceURL=css/addedInlineStylesheet.css */";
+ document.head.appendChild(styleElement);
+}
+
+function addInlineStyleSheetDeprecated()
+{
+ var styleElement = document.createElement("style");
+ styleElement.textContent = "body { color: black; }\n/*@ sourceURL=css/addedInlineStylesheetDeprecated.css */";
document.head.appendChild(styleElement);
}
function addInlineStyleSheetNonRelative()
{
var styleElement = document.createElement("style");
- styleElement.textContent = "body { color: red; }\n/*@ sourceURL=/css/nonRelativeInlineStylesheet.css */";
+ styleElement.textContent = "body { color: red; }\n/*# sourceURL=/css/nonRelativeInlineStylesheet.css */";
document.head.appendChild(styleElement);
}
@@ -70,6 +77,19 @@ function test()
}
},
+ function testDeprecatedSourceURLComment(next)
+ {
+ InspectorTest.showScriptSource("css/addedInlineStylesheetDeprecated.css", didShowSource);
+ InspectorTest.evaluateInPage("setTimeout(addInlineStyleSheetDeprecated, 0)");
+
+ function didShowSource(sourceFrame)
+ {
+ InspectorTest.addResult(sourceFrame.textEditor.text());
+ forEachHeaderMatchingURL("addedInlineStylesheetDeprecated", checkHeaderHasSourceURL);
+ next();
+ }
+ },
+
function testNonRelativeURL(next)
{
InspectorTest.showScriptSource("/css/nonRelativeInlineStylesheet.css", didShowSource);

Powered by Google App Engine
This is Rietveld 408576698