| OLD | NEW |
| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 134 } |
| 135 InspectorTest.nodeWithId("toggle", nodeCallback); | 135 InspectorTest.nodeWithId("toggle", nodeCallback); |
| 136 }, | 136 }, |
| 137 | 137 |
| 138 function test_tableStyles(next) | 138 function test_tableStyles(next) |
| 139 { | 139 { |
| 140 function setTextCallback(error, result) | 140 function setTextCallback(error, result) |
| 141 { | 141 { |
| 142 InspectorTest.addResult(""); | 142 InspectorTest.addResult(""); |
| 143 InspectorTest.addResult("=== Stylesheet-for-inline-style modific
ation result ==="); | 143 InspectorTest.addResult("=== Stylesheet-for-inline-style modific
ation result ==="); |
| 144 InspectorTest.addResult(error); | 144 InspectorTest.addResult(error || null); |
| 145 next(); | 145 next(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 function textCallback(inlineStyle, error, result) | 148 function textCallback(inlineStyle, error, result) |
| 149 { | 149 { |
| 150 InspectorTest.addResult(""); | 150 InspectorTest.addResult(""); |
| 151 InspectorTest.addResult("=== Stylesheet-for-inline-style text ==
="); | 151 InspectorTest.addResult("=== Stylesheet-for-inline-style text ==
="); |
| 152 InspectorTest.addResult(result); | 152 InspectorTest.addResult(result); |
| 153 InspectorTest.CSSAgent.setStyleSheetText(inlineStyle.styleSheetI
d, "", setTextCallback); | 153 InspectorTest.CSSAgent.setStyleSheetText(inlineStyle.styleSheetI
d, "").then(setTextCallback); |
| 154 } | 154 } |
| 155 | 155 |
| 156 function callback(error, inlineStyle, attributesStyle) | 156 function callback(error, inlineStyle, attributesStyle) |
| 157 { | 157 { |
| 158 if (error) { | 158 if (error) { |
| 159 InspectorTest.addResult("error: " + error); | 159 InspectorTest.addResult("error: " + error); |
| 160 return; | 160 return; |
| 161 } | 161 } |
| 162 InspectorTest.addResult(""); | 162 InspectorTest.addResult(""); |
| 163 InspectorTest.addResult("=== Attributes style for table ==="); | 163 InspectorTest.addResult("=== Attributes style for table ==="); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 <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)"> |
| 279 <p> | 279 <p> |
| 280 Tests that InspectorCSSAgent API methods work as expected. | 280 Tests that InspectorCSSAgent API methods work as expected. |
| 281 </p> | 281 </p> |
| 282 <table width="50%" id="thetable"> | 282 <table width="50%" id="thetable"> |
| 283 </table> | 283 </table> |
| 284 <h1 id="toggle">H1</h1> | 284 <h1 id="toggle">H1</h1> |
| 285 </body> | 285 </body> |
| 286 </html> | 286 </html> |
| OLD | NEW |