1 function initialize_StylesTests()
4 InspectorTest
.waitForStylesheetsOnFrontend = function(styleSheetsCount
, callback
)
6 var styleSheets
= InspectorTest
.cssModel
.allStyleSheets();
7 if (styleSheets
.length
>= styleSheetsCount
) {
12 function onStyleSheetAdded()
14 var styleSheets
= InspectorTest
.cssModel
.allStyleSheets();
15 if (styleSheets
.length
< styleSheetsCount
)
18 InspectorTest
.cssModel
.removeEventListener(WebInspector
.CSSStyleModel
.Events
.StyleSheetAdded
, onStyleSheetAdded
, this);
19 styleSheets
.sort(styleSheetComparator
);
20 callback(null, styleSheets
);
23 InspectorTest
.cssModel
.addEventListener(WebInspector
.CSSStyleModel
.Events
.StyleSheetAdded
, onStyleSheetAdded
, this);