Index: LayoutTests/inspector/elements/styles/dynamic-style-tag.html |
diff --git a/LayoutTests/inspector/elements/styles/dynamic-style-tag.html b/LayoutTests/inspector/elements/styles/dynamic-style-tag.html |
index e893ea052177c6d34faf734b893db2d738476d95..0b858edbfb50dda93b47f1f604b7358379410e14 100644 |
--- a/LayoutTests/inspector/elements/styles/dynamic-style-tag.html |
+++ b/LayoutTests/inspector/elements/styles/dynamic-style-tag.html |
@@ -30,6 +30,7 @@ var test = function() |
{ |
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, styleSheetAdded); |
InspectorTest.reloadPage(step1); |
+ var styleSheets = []; |
function pathToFileName(path) |
{ |
@@ -40,30 +41,30 @@ var test = function() |
{ |
InspectorTest.selectNodeAndWaitForStyles("inspected", step2); |
} |
- |
+ |
function step2() |
{ |
+ styleSheets.sort(); |
+ for (var i = 0; i < styleSheets.length; ++i) |
+ InspectorTest.addResult(styleSheets[i]); |
InspectorTest.dumpSelectedElementStyles(true, false, true); |
InspectorTest.completeTest(); |
} |
- function dumpStyleSheetHeader(header, text) |
- { |
- InspectorTest.addResult("Stylesheet added:"); |
- InspectorTest.addResult(" - isInline: " + header.isInline); |
- InspectorTest.addResult(" - sourceURL: " + pathToFileName(header.sourceURL)); |
- InspectorTest.addResult(" - hasSourceURL: " + header.hasSourceURL); |
- InspectorTest.addResult(" - contents: " + text); |
- } |
- |
function styleSheetAdded(event) |
{ |
var header = event.data; |
+ var text = ["Stylesheet added:"]; |
+ text.push(" - isInline: " + header.isInline); |
+ text.push(" - sourceURL: " + pathToFileName(header.sourceURL)); |
+ text.push(" - hasSourceURL: " + header.hasSourceURL); |
+ |
CSSAgent.getStyleSheetText(header.id, contentLoaded.bind(this)); |
- function contentLoaded(error, text) |
+ function contentLoaded(error, content) |
{ |
- dumpStyleSheetHeader(header, text); |
+ text.push(" - contents: " + content); |
+ styleSheets.push(text.join("\n")); |
} |
} |
} |