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

Side by Side Diff: LayoutTests/inspector/elements/styles-1/cached-sync-computed-styles.html

Issue 1355423003: Devtools: initialize protocol enums synchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed WebInspector._connectionForTests Created 5 years, 3 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style id="style"> 3 <style id="style">
4 #inspected { 4 #inspected {
5 background-color: green; 5 background-color: green;
6 } 6 }
7 </style> 7 </style>
8 <script src="../../../http/tests/inspector/inspector-test.js"></script> 8 <script src="../../../http/tests/inspector/inspector-test.js"></script>
9 <script src="../../../http/tests/inspector/elements-test.js"></script> 9 <script src="../../../http/tests/inspector/elements-test.js"></script>
10 <script> 10 <script>
(...skipping 12 matching lines...) Expand all
23 function onBackendCall(domain, method, params) 23 function onBackendCall(domain, method, params)
24 { 24 {
25 if (method === "CSS.getComputedStyleForNode" && params.nodeId === nodeId ) 25 if (method === "CSS.getComputedStyleForNode" && params.nodeId === nodeId )
26 ++backendCallCount; 26 ++backendCallCount;
27 } 27 }
28 28
29 function step1(node) 29 function step1(node)
30 { 30 {
31 var callsLeft = 2; 31 var callsLeft = 2;
32 nodeId = node.id; 32 nodeId = node.id;
33 InspectorTest.addSniffer(InspectorBackend.connection(), "_wrapCallbackAn dSendMessageObject", onBackendCall, true); 33 InspectorTest.addSniffer(InspectorTest.connection, "_wrapCallbackAndSend MessageObject", onBackendCall, true);
34 InspectorTest.cssModel.computedStylePromise(nodeId).then(styleCallback); 34 InspectorTest.cssModel.computedStylePromise(nodeId).then(styleCallback);
35 InspectorTest.cssModel.computedStylePromise(nodeId).then(styleCallback); 35 InspectorTest.cssModel.computedStylePromise(nodeId).then(styleCallback);
36 function styleCallback() 36 function styleCallback()
37 { 37 {
38 if (--callsLeft) 38 if (--callsLeft)
39 return; 39 return;
40 InspectorTest.addResult("# of backend calls sent [2 requests]: " + b ackendCallCount); 40 InspectorTest.addResult("# of backend calls sent [2 requests]: " + b ackendCallCount);
41 InspectorTest.evaluateInPage("updateStyle()", step2); 41 InspectorTest.evaluateInPage("updateStyle()", step2);
42 } 42 }
43 } 43 }
(...skipping 15 matching lines...) Expand all
59 <p> 59 <p>
60 Tests that computed styles are cached across synchronous requests. 60 Tests that computed styles are cached across synchronous requests.
61 </p> 61 </p>
62 62
63 <div> 63 <div>
64 <div id="inspected">Test</div> 64 <div id="inspected">Test</div>
65 </div> 65 </div>
66 66
67 </body> 67 </body>
68 </html> 68 </html>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/inspector-test.js ('k') | LayoutTests/inspector/profiler/heap-snapshot-loader.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698