| 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."); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 textInputController.insertText("color"); | 33 textInputController.insertText("color"); |
| 34 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); | 34 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); |
| 35 textInputController.insertText("maroon"); | 35 textInputController.insertText("maroon"); |
| 36 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | 36 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); |
| 37 InspectorTest.selectNodeAndWaitForStyles("other", step3); | 37 InspectorTest.selectNodeAndWaitForStyles("other", step3); |
| 38 } | 38 } |
| 39 | 39 |
| 40 function step3() | 40 function step3() |
| 41 { | 41 { |
| 42 // Click "Add new rule". | 42 // Click "Add new rule". |
| 43 document.getElementById("add-style-button-test-id").click(); | 43 InspectorTest.addNewRule(null, onRuleAdded); |
| 44 InspectorTest.selectNodeAndWaitForStyles("inspected", step4); | 44 |
| 45 function onRuleAdded() |
| 46 { |
| 47 InspectorTest.selectNodeAndWaitForStyles("inspected", step4); |
| 48 } |
| 45 } | 49 } |
| 46 | 50 |
| 47 function step4() | 51 function step4() |
| 48 { | 52 { |
| 49 InspectorTest.addResult("After adding new rule (inspected):"); | 53 InspectorTest.addResult("After adding new rule (inspected):"); |
| 50 InspectorTest.dumpSelectedElementStyles(true, false, true, true); | 54 InspectorTest.dumpSelectedElementStyles(true, false, true, true); |
| 51 InspectorTest.selectNodeAndWaitForStyles("other", step5); | 55 InspectorTest.selectNodeAndWaitForStyles("other", step5); |
| 52 } | 56 } |
| 53 | 57 |
| 54 function step5() | 58 function step5() |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 <div> | 111 <div> |
| 108 <div class="my-class"></div> | 112 <div class="my-class"></div> |
| 109 <div class="my-class"></div> | 113 <div class="my-class"></div> |
| 110 <div class="my-class"></div> | 114 <div class="my-class"></div> |
| 111 </div> | 115 </div> |
| 112 | 116 |
| 113 <div class=" class-1 class-2 class-3 "></div> | 117 <div class=" class-1 class-2 class-3 "></div> |
| 114 | 118 |
| 115 </body> | 119 </body> |
| 116 </html> | 120 </html> |
| OLD | NEW |