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

Unified Diff: trunk/LayoutTests/inspector/elements/styles/dynamic-style-tag.html

Issue 196743008: Revert 169371 "DevTools: defer styles delta calculation to until..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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: trunk/LayoutTests/inspector/elements/styles/dynamic-style-tag.html
===================================================================
--- trunk/LayoutTests/inspector/elements/styles/dynamic-style-tag.html (revision 169387)
+++ trunk/LayoutTests/inspector/elements/styles/dynamic-style-tag.html (working copy)
@@ -30,7 +30,6 @@
{
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, styleSheetAdded);
InspectorTest.reloadPage(step1);
- var styleSheets = [];
function pathToFileName(path)
{
@@ -41,30 +40,30 @@
{
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, content)
+ function contentLoaded(error, text)
{
- text.push(" - contents: " + content);
- styleSheets.push(text.join("\n"));
+ dumpStyleSheetHeader(header, text);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698