| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 184 } |
| 185 InspectorTest.CSSAgent.getMatchedStylesForNode(bodyId, didGetSty
les); | 185 InspectorTest.CSSAgent.getMatchedStylesForNode(bodyId, didGetSty
les); |
| 186 } | 186 } |
| 187 | 187 |
| 188 function ruleAdded(error, rule) | 188 function ruleAdded(error, rule) |
| 189 { | 189 { |
| 190 if (error) { | 190 if (error) { |
| 191 InspectorTest.addResult("error: " + error); | 191 InspectorTest.addResult("error: " + error); |
| 192 return; | 192 return; |
| 193 } | 193 } |
| 194 InspectorTest.CSSAgent.setStyleText(rule.style.styleSheetId, { | 194 InspectorTest.CSSAgent.setStyleTexts([ |
| 195 startLine: rule.style.range.startLine, | 195 { |
| 196 startColumn: rule.style.range.startColumn, | 196 styleSheetId: rule.style.styleSheetId, |
| 197 endLine: rule.style.range.startLine, | 197 range: { |
| 198 endColumn: rule.style.range.startColumn | 198 startLine: rule.style.range.startLine, |
| 199 }, "font-family: serif;", didSetStyleText); | 199 startColumn: rule.style.range.startColumn, |
| 200 endLine: rule.style.range.startLine, |
| 201 endColumn: rule.style.range.startColumn |
| 202 }, |
| 203 text: "font-family: serif;", |
| 204 }, |
| 205 ], didSetStyleText); |
| 200 } | 206 } |
| 201 | 207 |
| 202 function viaInspectorStyleSheetCreated(error, styleSheetId) | 208 function viaInspectorStyleSheetCreated(error, styleSheetId) |
| 203 { | 209 { |
| 204 if (error) { | 210 if (error) { |
| 205 InspectorTest.addResult("error: " + error); | 211 InspectorTest.addResult("error: " + error); |
| 206 InspectorTest.completeTest(); | 212 InspectorTest.completeTest(); |
| 207 return; | 213 return; |
| 208 } | 214 } |
| 209 var range = { | 215 var range = { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 273 |
| 268 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font-
weight: normal; width: 85%; background-image: url(bar.png)"> | 274 <body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font-
weight: normal; width: 85%; background-image: url(bar.png)"> |
| 269 <p> | 275 <p> |
| 270 Tests that InspectorCSSAgent API methods work as expected. | 276 Tests that InspectorCSSAgent API methods work as expected. |
| 271 </p> | 277 </p> |
| 272 <table width="50%" id="thetable"> | 278 <table width="50%" id="thetable"> |
| 273 </table> | 279 </table> |
| 274 <h1 id="toggle">H1</h1> | 280 <h1 id="toggle">H1</h1> |
| 275 </body> | 281 </body> |
| 276 </html> | 282 </html> |
| OLD | NEW |