| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 4 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/elements-test.js"></script> | 5 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 var formattedStyle; | 10 var formattedStyle; |
| 11 var unformattedStyle; | 11 var unformattedStyle; |
| 12 | 12 |
| 13 | 13 |
| 14 InspectorTest.cssModel.addEventListener(WebInspector.CSSModel.Events.StyleSh
eetChanged, onStyleSheetChanged, this); | 14 InspectorTest.cssModel.addEventListener(SDK.CSSModel.Events.StyleSheetChange
d, onStyleSheetChanged, this); |
| 15 | 15 |
| 16 function onStyleSheetChanged(event) | 16 function onStyleSheetChanged(event) |
| 17 { | 17 { |
| 18 if (!event.data || !event.data.edit) | 18 if (!event.data || !event.data.edit) |
| 19 return; | 19 return; |
| 20 if (formattedStyle) | 20 if (formattedStyle) |
| 21 formattedStyle.rebase(event.data.edit); | 21 formattedStyle.rebase(event.data.edit); |
| 22 if (unformattedStyle) | 22 if (unformattedStyle) |
| 23 unformattedStyle.rebase(event.data.edit); | 23 unformattedStyle.rebase(event.data.edit); |
| 24 } | 24 } |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 </head> | 288 </head> |
| 289 | 289 |
| 290 <body id="mainBody" onload="runTest()"> | 290 <body id="mainBody" onload="runTest()"> |
| 291 <p> | 291 <p> |
| 292 Tests that InspectorCSSAgent formats the CSS style text based on the CSS model m
odifications. | 292 Tests that InspectorCSSAgent formats the CSS style text based on the CSS model m
odifications. |
| 293 </p> | 293 </p> |
| 294 <div id="formatted">Formatted</div> | 294 <div id="formatted">Formatted</div> |
| 295 <div id="unformatted">Unformatted</div> | 295 <div id="unformatted">Unformatted</div> |
| 296 </body> | 296 </body> |
| 297 </html> | 297 </html> |
| OLD | NEW |