3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
12 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback);
13 function selectCallback()
15 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_innerRebuildUpdate", sniffRebuild, true);
16 var stylesPane = WebInspector.panels.elements.sidebarPanes.styles;
17 for (var i = 0; i < UPDATE_COUNT; ++i)
18 stylesPane.update(stylesPane.node, true);
20 InspectorTest.runAfterPendingDispatches(completeCallback);
23 function completeCallback()
25 if (rebuildCount >= UPDATE_COUNT)
26 InspectorTest.addResult("ERROR: got " + rebuildCount + " rebuilds for " + UPDATE_COUNT + " consecutive updates");
28 InspectorTest.addResult("OK: rebuilds throttled");
29 InspectorTest.completeTest();
32 function sniffRebuild()
41 <body onload="runTest()">
43 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>.
46 <div id="inspected"></div>