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

Unified Diff: trunk/LayoutTests/inspector/elements/styles/styles-test.js

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/styles-test.js
===================================================================
--- trunk/LayoutTests/inspector/elements/styles/styles-test.js (revision 169387)
+++ trunk/LayoutTests/inspector/elements/styles/styles-test.js (working copy)
@@ -3,8 +3,18 @@
InspectorTest.waitForStylesheetsOnFrontend = function(styleSheetsCount, callback)
{
+ function styleSheetComparator(a, b)
+ {
+ if (a.sourceURL < b.sourceURL)
+ return -1;
+ else if (a.sourceURL > b.sourceURL)
+ return 1;
+ return a.startLine - b.startLine || a.startColumn - b.startColumn;
+ }
+
var styleSheets = WebInspector.cssModel.allStyleSheets();
if (styleSheets.length >= styleSheetsCount) {
+ styleSheets.sort(styleSheetComparator);
callback(styleSheets);
return;
}

Powered by Google App Engine
This is Rietveld 408576698