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); |