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

Side by Side Diff: LayoutTests/inspector/elements/styles-4/styles-new-API.html

Issue 1196193016: DevTools: [CSS] promisify CSS domain (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 5 years, 6 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 3
4 <link rel="stylesheet" href="resources/styles-new-API.css"> 4 <link rel="stylesheet" href="resources/styles-new-API.css">
5 5
6 <script src="../../../http/tests/inspector/inspector-test.js"></script> 6 <script src="../../../http/tests/inspector/inspector-test.js"></script>
7 <script src="../../../http/tests/inspector/elements-test.js"></script> 7 <script src="../../../http/tests/inspector/elements-test.js"></script>
8 <script src="../styles/styles-test.js"></script> 8 <script src="../styles/styles-test.js"></script>
9 <script> 9 <script>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 { 72 {
73 if (error) { 73 if (error) {
74 InspectorTest.addResult("error: " + error); 74 InspectorTest.addResult("error: " + error);
75 InspectorTest.completeTest(); 75 InspectorTest.completeTest();
76 return; 76 return;
77 } 77 }
78 78
79 resultStyles.matchedCSSRules = matchedCSSRules; 79 resultStyles.matchedCSSRules = matchedCSSRules;
80 resultStyles.pseudoElements = pseudoElements; 80 resultStyles.pseudoElements = pseudoElements;
81 resultStyles.inherited = inherited; 81 resultStyles.inherited = inherited;
82 callback(resultStyles);
83 } 82 }
84 83
85 function nodeCallback(node) 84 function nodeCallback(node)
86 { 85 {
87 bodyId = node.id; 86 bodyId = node.id;
88 InspectorTest.CSSAgent.getComputedStyleForNode(node.id, computed Callback); 87 var promises = [
89 InspectorTest.CSSAgent.getInlineStylesForNode(node.id, inlineCal lback); 88 InspectorTest.CSSAgent.getComputedStyleForNode(node.id, comp utedCallback),
90 InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, false, f alse, matchedCallback); 89 InspectorTest.CSSAgent.getInlineStylesForNode(node.id, inlin eCallback),
90 InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, fals e, false, matchedCallback)
91 ];
92 Promise.all(promises).then(callback.bind(null, resultStyles));
91 } 93 }
92 InspectorTest.selectNodeWithId("mainBody", nodeCallback); 94 InspectorTest.selectNodeWithId("mainBody", nodeCallback);
93 }, 95 },
94 96
95 function test_forcedState(next) 97 function test_forcedState(next)
96 { 98 {
97 InspectorTest.CSSAgent.forcePseudoState(bodyId, ["hover"]); 99 InspectorTest.CSSAgent.forcePseudoState(bodyId, ["hover"]);
98 InspectorTest.CSSAgent.getMatchedStylesForNode(bodyId, false, false, matchedCallback); 100 InspectorTest.CSSAgent.getMatchedStylesForNode(bodyId, false, false, matchedCallback);
99 101
100 function matchedCallback(error, matchedRules) 102 function matchedCallback(error, matchedRules)
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 277
276 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font- weight: normal; width: 85%; background-image: url(bar.png)"> 278 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font- weight: normal; width: 85%; background-image: url(bar.png)">
277 <p> 279 <p>
278 Tests that InspectorCSSAgent API methods work as expected. 280 Tests that InspectorCSSAgent API methods work as expected.
279 </p> 281 </p>
280 <table width="50%" id="thetable"> 282 <table width="50%" id="thetable">
281 </table> 283 </table>
282 <h1 id="toggle">H1</h1> 284 <h1 id="toggle">H1</h1>
283 </body> 285 </body>
284 </html> 286 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698