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 if (!window.eventSender || !window.textInputController) { | 9 if (!window.eventSender || !window.textInputController) { |
10 document.write("This test does not work in manual mode."); | 10 document.write("This test does not work in manual mode."); |
11 InspectorTest.completeTest(); | 11 InspectorTest.completeTest(); |
12 return; | 12 return; |
13 } | 13 } |
14 | 14 |
15 WebInspector.inspectorView.showPanel("elements"); | 15 WebInspector.inspectorView.showPanel("elements"); |
16 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); | 16 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); |
17 InspectorTest.addSniffer(WebInspector.UISourceCode.prototype, "addRevision",
revisionAdded); | 17 InspectorTest.addSniffer(WebInspector.UISourceCode.prototype, "addRevision",
revisionAdded); |
18 | 18 |
19 var treeElement; | 19 var treeElement; |
20 var hasResourceChanged; | 20 var hasResourceChanged; |
21 | 21 |
22 function step1() | 22 function step1() |
23 { | 23 { |
24 // Click "Add new rule". | 24 // Click "Add new rule". |
25 document.getElementById("add-style-button-test-id").click(); | 25 InspectorTest.addNewRule("foo, div#inspected, bar", step2); |
26 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; | |
27 section._selectorElement.textContent = "foo, " + section._selectorElemen
t.textContent + ", bar"; | |
28 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | |
29 InspectorTest.runAfterPendingDispatches(step2); | |
30 } | 26 } |
31 | 27 |
32 function step2() | 28 function step2() |
33 { | 29 { |
34 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; | 30 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; |
35 var newProperty = section.addNewBlankProperty(); | 31 var newProperty = section.addNewBlankProperty(); |
36 newProperty.startEditing(); | 32 newProperty.startEditing(); |
37 textInputController.insertText("color"); | 33 textInputController.insertText("color"); |
38 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); | 34 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); |
39 textInputController.insertText("maroon"); | 35 textInputController.insertText("maroon"); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 <div> | 107 <div> |
112 <div class="my-class"></div> | 108 <div class="my-class"></div> |
113 <div class="my-class"></div> | 109 <div class="my-class"></div> |
114 <div class="my-class"></div> | 110 <div class="my-class"></div> |
115 </div> | 111 </div> |
116 | 112 |
117 <div class=" class-1 class-2 class-3 "></div> | 113 <div class=" class-1 class-2 class-3 "></div> |
118 | 114 |
119 </body> | 115 </body> |
120 </html> | 116 </html> |
OLD | NEW |