3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
11 WebInspector.showPanel("elements");
13 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback);
14 function selectCallback()
16 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_innerRebuildUpdate", sniffRebuild, true);
17 var stylesPane = WebInspector.panels.elements.sidebarPanes.styles;
18 for (var i = 0; i < UPDATE_COUNT; ++i)
19 stylesPane.update(stylesPane.node, true);
21 InspectorTest.runAfterPendingDispatches(completeCallback);
24 function completeCallback()
26 if (rebuildCount >= UPDATE_COUNT)
27 InspectorTest.addResult("ERROR: got " + rebuildCount + " rebuilds for " + UPDATE_COUNT + " consecutive updates");
29 InspectorTest.addResult("OK: rebuilds throttled");
30 InspectorTest.completeTest();
33 function sniffRebuild()
42 <body onload="runTest()">
44 Tests that Styles sidebar DOM rebuilds are throttled during consecutive updates. <a href="https://bugs.webkit.org/show_bug.cgi?id=78086">Bug 78086</a>.
47 <div id="inspected"></div>