OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 #inspected { | 4 #inspected { |
5 color: green; | 5 color: green; |
6 } | 6 } |
7 </style> | 7 </style> |
8 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 8 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
9 <script src="../../../http/tests/inspector/elements-test.js"></script> | 9 <script src="../../../http/tests/inspector/elements-test.js"></script> |
10 <script> | 10 <script> |
(...skipping 10 matching lines...) Expand all Loading... |
21 section.startEditingSelector(); | 21 section.startEditingSelector(); |
22 section._selectorElement.textContent = "#inspected, #other"; | 22 section._selectorElement.textContent = "#inspected, #other"; |
23 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | 23 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); |
24 InspectorTest.selectNodeAndWaitForStyles("other", step2); | 24 InspectorTest.selectNodeAndWaitForStyles("other", step2); |
25 } | 25 } |
26 | 26 |
27 function step2() | 27 function step2() |
28 { | 28 { |
29 InspectorTest.addResult("=== After selector modification ==="); | 29 InspectorTest.addResult("=== After selector modification ==="); |
30 InspectorTest.dumpSelectedElementStyles(true); | 30 InspectorTest.dumpSelectedElementStyles(true); |
31 WebInspector.domModel.undo(); | 31 InspectorTest.domModel.undo(); |
32 InspectorTest.selectNodeAndWaitForStyles("inspected", step3); | 32 InspectorTest.selectNodeAndWaitForStyles("inspected", step3); |
33 } | 33 } |
34 | 34 |
35 function step3() | 35 function step3() |
36 { | 36 { |
37 InspectorTest.addResult("=== After undo ==="); | 37 InspectorTest.addResult("=== After undo ==="); |
38 InspectorTest.dumpSelectedElementStyles(true); | 38 InspectorTest.dumpSelectedElementStyles(true); |
39 | 39 |
40 WebInspector.domModel.redo(); | 40 InspectorTest.domModel.redo(); |
41 InspectorTest.selectNodeAndWaitForStyles("other", step4); | 41 InspectorTest.selectNodeAndWaitForStyles("other", step4); |
42 } | 42 } |
43 | 43 |
44 function step4() | 44 function step4() |
45 { | 45 { |
46 InspectorTest.addResult("=== After redo ==="); | 46 InspectorTest.addResult("=== After redo ==="); |
47 InspectorTest.dumpSelectedElementStyles(true); | 47 InspectorTest.dumpSelectedElementStyles(true); |
48 InspectorTest.completeTest(); | 48 InspectorTest.completeTest(); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 </script> | 52 </script> |
53 </head> | 53 </head> |
54 | 54 |
55 <body onload="runTest()"> | 55 <body onload="runTest()"> |
56 <p> | 56 <p> |
57 Tests that setting selector text can be undone. | 57 Tests that setting selector text can be undone. |
58 </p> | 58 </p> |
59 | 59 |
60 <div id="inspected"></div> | 60 <div id="inspected"></div> |
61 <div id="other"></div> | 61 <div id="other"></div> |
62 | 62 |
63 </body> | 63 </body> |
64 </html> | 64 </html> |
OLD | NEW |