| 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 | 5 |
| 6 <style> | 6 <style> |
| 7 .container { | 7 .container { |
| 8 font-weight: bold | 8 font-weight: bold |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("font-weigh
t"); | 41 var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("font-weigh
t"); |
| 42 var treeElement = treeItem.section().addNewBlankProperty(index); | 42 var treeElement = treeItem.section().addNewBlankProperty(index); |
| 43 treeElement.applyStyleText(propertyText, true, true); | 43 treeElement.applyStyleText(propertyText, true, true); |
| 44 InspectorTest.waitForStyles("container", step1); | 44 InspectorTest.waitForStyles("container", step1); |
| 45 | 45 |
| 46 function step1() | 46 function step1() |
| 47 { | 47 { |
| 48 InspectorTest.addResult("(After adding property)"); | 48 InspectorTest.addResult("(After adding property)"); |
| 49 InspectorTest.dumpSelectedElementStyles(true); | 49 InspectorTest.dumpSelectedElementStyles(true); |
| 50 | 50 |
| 51 WebInspector.domModel.undo(); | 51 InspectorTest.domModel.undo(); |
| 52 InspectorTest.selectNodeAndWaitForStyles("other", step2); | 52 InspectorTest.selectNodeAndWaitForStyles("other", step2); |
| 53 } | 53 } |
| 54 | 54 |
| 55 function step2() | 55 function step2() |
| 56 { | 56 { |
| 57 InspectorTest.addResult("(After undo)"); | 57 InspectorTest.addResult("(After undo)"); |
| 58 InspectorTest.dumpSelectedElementStyles(true); | 58 InspectorTest.dumpSelectedElementStyles(true); |
| 59 | 59 |
| 60 WebInspector.domModel.redo(); | 60 InspectorTest.domModel.redo(); |
| 61 InspectorTest.selectNodeAndWaitForStyles("container", step3); | 61 InspectorTest.selectNodeAndWaitForStyles("container", step3); |
| 62 } | 62 } |
| 63 | 63 |
| 64 function step3() | 64 function step3() |
| 65 { | 65 { |
| 66 InspectorTest.addResult("(After redo)"); | 66 InspectorTest.addResult("(After redo)"); |
| 67 InspectorTest.dumpSelectedElementStyles(true); | 67 InspectorTest.dumpSelectedElementStyles(true); |
| 68 callback(); | 68 callback(); |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 </script> | 72 </script> |
| 73 </head> | 73 </head> |
| 74 | 74 |
| 75 <body onload="runTest()"> | 75 <body onload="runTest()"> |
| 76 <p> | 76 <p> |
| 77 Tests that adding a property is undone properly. | 77 Tests that adding a property is undone properly. |
| 78 </p> | 78 </p> |
| 79 | 79 |
| 80 <div id="container" class="container"></div> | 80 <div id="container" class="container"></div> |
| 81 <div id="other" class="container"></div> | 81 <div id="other" class="container"></div> |
| 82 | 82 |
| 83 </body> | 83 </body> |
| 84 </html> | 84 </html> |
| OLD | NEW |