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 WebInspector.inspectorView.showPanel("elements"); | 9 WebInspector.inspectorView.showPanel("elements"); |
10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); | 10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 { | 65 { |
66 InspectorTest.selectNodeAndWaitForStyles(nodeId, next); | 66 InspectorTest.selectNodeAndWaitForStyles(nodeId, next); |
67 } | 67 } |
68 | 68 |
69 InspectorTest.addNewRule("div.foo", selectNode); | 69 InspectorTest.addNewRule("div.foo", selectNode); |
70 } | 70 } |
71 | 71 |
72 function printStyleSheetAndCall(next) | 72 function printStyleSheetAndCall(next) |
73 { | 73 { |
74 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; | 74 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; |
75 var id = section.styleRule.style.id.styleSheetId; | 75 var id = section.styleRule.style.styleSheetId; |
76 CSSAgent.getStyleSheetText(id, callback); | 76 CSSAgent.getStyleSheetText(id, callback); |
77 function callback(result, styleSheetText) | 77 function callback(result, styleSheetText) |
78 { | 78 { |
79 InspectorTest.addResult("===== Style sheet text: ====="); | 79 InspectorTest.addResult("===== Style sheet text: ====="); |
80 InspectorTest.addResult(styleSheetText); | 80 InspectorTest.addResult(styleSheetText); |
81 InspectorTest.addResult("============================="); | 81 InspectorTest.addResult("============================="); |
82 next(); | 82 next(); |
83 } | 83 } |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 </script> | 87 </script> |
88 </head> | 88 </head> |
89 | 89 |
90 <body onload="runTest()"> | 90 <body onload="runTest()"> |
91 <p> | 91 <p> |
92 Tests that adding a new rule can be undone. | 92 Tests that adding a new rule can be undone. |
93 </p> | 93 </p> |
94 | 94 |
95 <div class="foo" id="inspected" style="font-size: 12px">Text</div> | 95 <div class="foo" id="inspected" style="font-size: 12px">Text</div> |
96 <div class="foo" id="other" style="color:red"></div> | 96 <div class="foo" id="other" style="color:red"></div> |
97 | 97 |
98 </body> | 98 </body> |
99 </html> | 99 </html> |
OLD | NEW |