Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles / styles-test.js
blob6b6d4f08ea971779a38cb27615e3886dd4821437
1 function initialize_StylesTests()
4 InspectorTest.waitForStylesheetsOnFrontend = function(styleSheetsCount, callback)
6 var styleSheets = InspectorTest.cssModel.allStyleSheets();
7 if (styleSheets.length >= styleSheetsCount) {
8 callback(styleSheets);
9 return;
12 function onStyleSheetAdded()
14 var styleSheets = InspectorTest.cssModel.allStyleSheets();
15 if (styleSheets.length < styleSheetsCount)
16 return;
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);