| 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 InspectorTest.selectNodeAndWaitForStyles("container", step1); | 9 InspectorTest.selectNodeAndWaitForStyles("container", step1); |
| 10 | 10 |
| 11 function step1(node) | 11 function step1(node) |
| 12 { | 12 { |
| 13 InspectorTest.addResult("Before disable"); | 13 InspectorTest.addResult("Before disable"); |
| 14 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); | 14 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); |
| 15 InspectorTest.dumpStyleTreeItem(treeItem, ""); | 15 InspectorTest.dumpStyleTreeItem(treeItem, ""); |
| 16 | 16 |
| 17 InspectorTest.toggleStyleProperty("font-weight", false); | 17 InspectorTest.toggleStyleProperty("font-weight", false); |
| 18 InspectorTest.waitForStyles("container", step2); | 18 InspectorTest.waitForStyles("container", step2); |
| 19 } | 19 } |
| 20 | 20 |
| 21 function step2() | 21 function step2() |
| 22 { | 22 { |
| 23 InspectorTest.addResult("After disable"); | 23 InspectorTest.addResult("After disable"); |
| 24 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); | 24 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); |
| 25 InspectorTest.dumpStyleTreeItem(treeItem, ""); | 25 InspectorTest.dumpStyleTreeItem(treeItem, ""); |
| 26 | 26 |
| 27 WebInspector.domModel.undo(); | 27 InspectorTest.domModel.undo(); |
| 28 InspectorTest.waitForStyles("container", step3); | 28 InspectorTest.waitForStyles("container", step3); |
| 29 } | 29 } |
| 30 | 30 |
| 31 function step3() | 31 function step3() |
| 32 { | 32 { |
| 33 InspectorTest.addResult("After undo"); | 33 InspectorTest.addResult("After undo"); |
| 34 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); | 34 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); |
| 35 InspectorTest.dumpStyleTreeItem(treeItem, ""); | 35 InspectorTest.dumpStyleTreeItem(treeItem, ""); |
| 36 | 36 |
| 37 WebInspector.domModel.redo(); | 37 InspectorTest.domModel.redo(); |
| 38 InspectorTest.waitForStyles("container", step4); | 38 InspectorTest.waitForStyles("container", step4); |
| 39 } | 39 } |
| 40 | 40 |
| 41 function step4() | 41 function step4() |
| 42 { | 42 { |
| 43 InspectorTest.addResult("After redo"); | 43 InspectorTest.addResult("After redo"); |
| 44 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); | 44 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weigh
t"); |
| 45 InspectorTest.dumpStyleTreeItem(treeItem, ""); | 45 InspectorTest.dumpStyleTreeItem(treeItem, ""); |
| 46 InspectorTest.completeTest(); | 46 InspectorTest.completeTest(); |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 </script> | 49 </script> |
| 50 </head> | 50 </head> |
| 51 | 51 |
| 52 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 53 <p> | 53 <p> |
| 54 Tests that disabling style is undone properly. | 54 Tests that disabling style is undone properly. |
| 55 </p> | 55 </p> |
| 56 | 56 |
| 57 <div id="container" style="font-weight:bold"> | 57 <div id="container" style="font-weight:bold"> |
| 58 </div> | 58 </div> |
| 59 | 59 |
| 60 </body> | 60 </body> |
| 61 </html> | 61 </html> |
| OLD | NEW |