| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); | 9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 { | 64 { |
| 65 InspectorTest.selectNodeAndWaitForStyles(nodeId, next); | 65 InspectorTest.selectNodeAndWaitForStyles(nodeId, next); |
| 66 } | 66 } |
| 67 | 67 |
| 68 InspectorTest.addNewRule("div.foo", selectNode); | 68 InspectorTest.addNewRule("div.foo", selectNode); |
| 69 } | 69 } |
| 70 | 70 |
| 71 function printStyleSheetAndCall(next) | 71 function printStyleSheetAndCall(next) |
| 72 { | 72 { |
| 73 var section = InspectorTest.firstMatchedStyleSection(); | 73 var section = InspectorTest.firstMatchedStyleSection(); |
| 74 var id = section.styleRule.style().styleSheetId; | 74 var id = section.style().styleSheetId; |
| 75 InspectorTest.CSSAgent.getStyleSheetText(id, callback); | 75 InspectorTest.CSSAgent.getStyleSheetText(id, callback); |
| 76 function callback(error, styleSheetText) | 76 function callback(error, styleSheetText) |
| 77 { | 77 { |
| 78 InspectorTest.addResult("===== Style sheet text: ====="); | 78 InspectorTest.addResult("===== Style sheet text: ====="); |
| 79 InspectorTest.addResult(styleSheetText); | 79 InspectorTest.addResult(styleSheetText); |
| 80 InspectorTest.addResult("============================="); | 80 InspectorTest.addResult("============================="); |
| 81 next(); | 81 next(); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 </script> | 86 </script> |
| 87 </head> | 87 </head> |
| 88 | 88 |
| 89 <body onload="runTest()"> | 89 <body onload="runTest()"> |
| 90 <p> | 90 <p> |
| 91 Tests that adding a new rule can be undone. | 91 Tests that adding a new rule can be undone. |
| 92 </p> | 92 </p> |
| 93 | 93 |
| 94 <div class="foo" id="inspected" style="font-size: 12px">Text</div> | 94 <div class="foo" id="inspected" style="font-size: 12px">Text</div> |
| 95 <div class="foo" id="other" style="color:red"></div> | 95 <div class="foo" id="other" style="color:red"></div> |
| 96 | 96 |
| 97 </body> | 97 </body> |
| 98 </html> | 98 </html> |
| OLD | NEW |