| 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 document.getElementById("add-style-button-test-id").click(); |
| 26 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; | 26 var section = WebInspector.inspectorView.panel("elements").sidebarPanes.
styles.sections[0][2]; |
| 27 section._selectorElement.textContent = "foo, " + section._selectorElemen
t.textContent + ", bar"; | 27 section._selectorElement.textContent = "foo, " + section._selectorElemen
t.textContent + ", bar"; |
| 28 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | 28 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); |
| 29 InspectorTest.runAfterPendingDispatches(step2); | 29 InspectorTest.runAfterPendingDispatches(step2); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function step2() | 32 function step2() |
| 33 { | 33 { |
| 34 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[
0][2]; | 34 var section = WebInspector.inspectorView.panel("elements").sidebarPanes.
styles.sections[0][2]; |
| 35 var newProperty = section.addNewBlankProperty(); | 35 var newProperty = section.addNewBlankProperty(); |
| 36 newProperty.startEditing(); | 36 newProperty.startEditing(); |
| 37 textInputController.insertText("color"); | 37 textInputController.insertText("color"); |
| 38 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); | 38 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); |
| 39 textInputController.insertText("maroon"); | 39 textInputController.insertText("maroon"); |
| 40 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | 40 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); |
| 41 InspectorTest.selectNodeAndWaitForStyles("other", step3); | 41 InspectorTest.selectNodeAndWaitForStyles("other", step3); |
| 42 } | 42 } |
| 43 | 43 |
| 44 function step3() | 44 function step3() |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 <div> | 111 <div> |
| 112 <div class="my-class"></div> | 112 <div class="my-class"></div> |
| 113 <div class="my-class"></div> | 113 <div class="my-class"></div> |
| 114 <div class="my-class"></div> | 114 <div class="my-class"></div> |
| 115 </div> | 115 </div> |
| 116 | 116 |
| 117 <div class=" class-1 class-2 class-3 "></div> | 117 <div class=" class-1 class-2 class-3 "></div> |
| 118 | 118 |
| 119 </body> | 119 </body> |
| 120 </html> | 120 </html> |
| OLD | NEW |