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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles/updates-throttled.html

Issue 2146233002: DevTools: reuse computedstylesmodel in the elements sidebar base class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (2) Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var UPDATE_COUNT = 5; 9 var UPDATE_COUNT = 5;
10 var rebuildCount = 0; 10 var rebuildCount = 0;
11 11
12 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback); 12 InspectorTest.selectNodeAndWaitForStyles("inspected", selectCallback);
13 function selectCallback() 13 function selectCallback()
14 { 14 {
15 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_inn erRebuildUpdate", sniffRebuild, true); 15 InspectorTest.addSniffer(WebInspector.StylesSidebarPane.prototype, "_inn erRebuildUpdate", sniffRebuild, true);
16 var stylesPane = WebInspector.panels.elements.sidebarPanes.styles; 16 var stylesPane = WebInspector.panels.elements.sidebarPanes.styles;
17 for (var i = 0; i < UPDATE_COUNT; ++i) 17 for (var i = 0; i < UPDATE_COUNT; ++i)
18 stylesPane.setNode(stylesPane.node()); 18 WebInspector.context.setFlavor(WebInspector.DOMNode, stylesPane.node ());
19 19
20 InspectorTest.deprecatedRunAfterPendingDispatches(completeCallback); 20 InspectorTest.deprecatedRunAfterPendingDispatches(completeCallback);
21 } 21 }
22 22
23 function completeCallback() 23 function completeCallback()
24 { 24 {
25 if (rebuildCount >= UPDATE_COUNT) 25 if (rebuildCount >= UPDATE_COUNT)
26 InspectorTest.addResult("ERROR: got " + rebuildCount + " rebuilds fo r " + UPDATE_COUNT + " consecutive updates"); 26 InspectorTest.addResult("ERROR: got " + rebuildCount + " rebuilds fo r " + UPDATE_COUNT + " consecutive updates");
27 else 27 else
28 InspectorTest.addResult("OK: rebuilds throttled"); 28 InspectorTest.addResult("OK: rebuilds throttled");
(...skipping 11 matching lines...) Expand all
40 40
41 <body onload="runTest()"> 41 <body onload="runTest()">
42 <p> 42 <p>
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>. 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>.
44 </p> 44 </p>
45 45
46 <div id="inspected"></div> 46 <div id="inspected"></div>
47 47
48 </body> 48 </body>
49 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698