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 var initialize_AdditionalPreload = function() { | 7 var initialize_AdditionalPreload = function() { |
8 InspectorTest.preloadModule("source_frame"); | 8 InspectorTest.preloadModule("source_frame"); |
9 } | 9 } |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 // Click "Add new rule". | 25 // Click "Add new rule". |
26 InspectorTest.addNewRule("foo, div#inspected, bar", step2); | 26 InspectorTest.addNewRule("foo, div#inspected, bar", step2); |
27 } | 27 } |
28 | 28 |
29 function step2() | 29 function step2() |
30 { | 30 { |
31 var section = InspectorTest.firstMatchedStyleSection(); | 31 var section = InspectorTest.firstMatchedStyleSection(); |
32 var newProperty = section.addNewBlankProperty(); | 32 var newProperty = section.addNewBlankProperty(); |
33 newProperty.startEditing(); | 33 newProperty.startEditing(); |
34 textInputController.insertText("color"); | 34 textInputController.insertText("color"); |
35 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("U+00
09")); // Tab | 35 newProperty.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Tab"
)); |
36 textInputController.insertText("maroon"); | 36 textInputController.insertText("maroon"); |
37 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("U+0
009")); // Tab | 37 newProperty.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Tab
")); |
38 InspectorTest.selectNodeAndWaitForStyles("other", step3); | 38 InspectorTest.selectNodeAndWaitForStyles("other", step3); |
39 } | 39 } |
40 | 40 |
41 function step3() | 41 function step3() |
42 { | 42 { |
43 // Click "Add new rule". | 43 // Click "Add new rule". |
44 InspectorTest.addNewRule(null, onRuleAdded); | 44 InspectorTest.addNewRule(null, onRuleAdded); |
45 | 45 |
46 function onRuleAdded() | 46 function onRuleAdded() |
47 { | 47 { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 <body onload="runTest()"> | 86 <body onload="runTest()"> |
87 <p> | 87 <p> |
88 Tests that adding a new rule works after switching nodes. | 88 Tests that adding a new rule works after switching nodes. |
89 </p> | 89 </p> |
90 | 90 |
91 <div id="inspected" style="font-size: 12px">Text</div> | 91 <div id="inspected" style="font-size: 12px">Text</div> |
92 <div id="other" style="color:red"></div> | 92 <div id="other" style="color:red"></div> |
93 | 93 |
94 </body> | 94 </body> |
95 </html> | 95 </html> |
OLD | NEW |