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

Side by Side Diff: LayoutTests/inspector/styles/styles-test.js

Issue 148523012: DevTools: [CSS] remove getAllStylesheets method from protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix testcase extension Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 function initialize_StylesTests()
2 {
3
4 InspectorTest.waitForStylesheetsOnFrontend = function(styleSheetsCount, callback )
5 {
6 function styleSheetComparator(a, b)
7 {
8 if (a.sourceURL < b.sourceURL)
9 return -1;
10 else if (a.sourceURL > b.sourceURL)
11 return 1;
12 return a.startLine - b.startLine || a.startColumn - b.startColumn;
13 }
14
15 var styleSheets = WebInspector.cssModel.allStyleSheets();
16 if (styleSheets.length >= styleSheetsCount) {
17 styleSheets.sort(styleSheetComparator);
18 callback(styleSheets);
19 return;
20 }
21
22 function onStyleSheetAdded()
23 {
24 var styleSheets = WebInspector.cssModel.allStyleSheets();
25 if (styleSheets.length < styleSheetsCount)
26 return;
27
28 WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Eve nts.StyleSheetAdded, onStyleSheetAdded, this);
29 styleSheets.sort(styleSheetComparator);
30 callback(null, styleSheets);
31 }
32
33 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty leSheetAdded, onStyleSheetAdded, this);
34 }
35
36 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/styles/styles-new-API-expected.txt ('k') | Source/core/inspector/InspectorCSSAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698