| 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; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 function nodeCallback(node) | 27 function nodeCallback(node) |
| 28 { | 28 { |
| 29 InspectorTest.cssModel.getMatchedStylesAsync(node.id, false, fal
se, callback); | 29 InspectorTest.cssModel.getMatchedStylesAsync(node.id, false, fal
se, callback); |
| 30 } | 30 } |
| 31 InspectorTest.selectNodeWithId("formatted", nodeCallback); | 31 InspectorTest.selectNodeWithId("formatted", nodeCallback); |
| 32 }, | 32 }, |
| 33 | 33 |
| 34 function testFormattedInsertStart(next) | 34 function testFormattedInsertStart(next) |
| 35 { | 35 { |
| 36 formattedStyle.insertPropertyAt(0, "firstProperty", "firstValue", du
mpFormattedAndCallNext.bind(null, next)); | 36 formattedStyle.insertPropertyAt(0, "firstProperty", "rgba(1, 2, 3, 0
)", dumpFormattedAndCallNext.bind(null, next)); |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 function testFormattedRemoveStart(next) | 39 function testFormattedRemoveStart(next) |
| 40 { | 40 { |
| 41 formattedStyle.allProperties[0].setText("", true, true, dumpFormatte
dAndCallNext.bind(null, next)); | 41 formattedStyle.allProperties[0].setText("", true, true, dumpFormatte
dAndCallNext.bind(null, next)); |
| 42 }, | 42 }, |
| 43 | 43 |
| 44 function testFormattedInsertMiddle(next) | 44 function testFormattedInsertMiddle(next) |
| 45 { | 45 { |
| 46 formattedStyle.insertPropertyAt(1, "middleProperty", "middleValue",
dumpFormattedAndCallNext.bind(null, next)); | 46 formattedStyle.insertPropertyAt(1, "middleProperty", "middleValue /*
comment */", dumpFormattedAndCallNext.bind(null, next)); |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 function testFormattedRemoveMiddle(next) | 49 function testFormattedRemoveMiddle(next) |
| 50 { | 50 { |
| 51 formattedStyle.allProperties[1].setText("", true, true, dumpFormatte
dAndCallNext.bind(null, next)); | 51 formattedStyle.allProperties[1].setText("", true, true, dumpFormatte
dAndCallNext.bind(null, next)); |
| 52 }, | 52 }, |
| 53 | 53 |
| 54 function testFormattedInsertEnd(next) | 54 function testFormattedInsertEnd(next) |
| 55 { | 55 { |
| 56 formattedStyle.insertPropertyAt(3, "endProperty", "endValue", dumpFo
rmattedAndCallNext.bind(null, next)); | 56 formattedStyle.insertPropertyAt(3, "endProperty", "endValue", dumpFo
rmattedAndCallNext.bind(null, next)); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 </head> | 239 </head> |
| 240 | 240 |
| 241 <body id="mainBody" onload="runTest()"> | 241 <body id="mainBody" onload="runTest()"> |
| 242 <p> | 242 <p> |
| 243 Tests that InspectorCSSAgent formats the CSS style text based on the CSS model m
odifications. | 243 Tests that InspectorCSSAgent formats the CSS style text based on the CSS model m
odifications. |
| 244 </p> | 244 </p> |
| 245 <div id="formatted">Formatted</div> | 245 <div id="formatted">Formatted</div> |
| 246 <div id="unformatted">Unformatted</div> | 246 <div id="unformatted">Unformatted</div> |
| 247 </body> | 247 </body> |
| 248 </html> | 248 </html> |
| OLD | NEW |