OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
4 <script src="../../../http/tests/inspector/elements-test.js"></script> | |
5 | |
6 <style> | |
7 .container { | |
8 font-weight: bold | |
9 } | |
10 </style> | |
11 | |
12 <script> | |
13 | |
14 function test() | |
15 { | |
16 InspectorTest.selectNodeAndWaitForStyles("container", step1); | |
17 | |
18 function step1() | |
19 { | |
20 InspectorTest.addResult("Initial value"); | |
21 InspectorTest.dumpSelectedElementStyles(true); | |
22 | |
23 var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("font-weigh
t"); | |
24 treeItem.applyStyleText("font-weight: normal", false); | |
25 InspectorTest.waitForStyles("container", step2); | |
26 } | |
27 | |
28 function step2() | |
29 { | |
30 InspectorTest.addResult("After changing property"); | |
31 InspectorTest.dumpSelectedElementStyles(true); | |
32 | |
33 InspectorTest.domModel.undo(); | |
34 InspectorTest.waitForStyles("container", step3); | |
35 } | |
36 | |
37 function step3() | |
38 { | |
39 InspectorTest.addResult("After undo"); | |
40 InspectorTest.dumpSelectedElementStyles(true); | |
41 | |
42 var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("font-weigh
t"); | |
43 treeItem.applyStyleText("font-weight: normal", false); | |
44 InspectorTest.waitForStyles("container", step4); | |
45 } | |
46 | |
47 function step4() | |
48 { | |
49 InspectorTest.addResult("After perform"); | |
50 InspectorTest.dumpSelectedElementStyles(true); | |
51 InspectorTest.completeTest(); | |
52 } | |
53 } | |
54 </script> | |
55 </head> | |
56 | |
57 <body onload="runTest()"> | |
58 <p> | |
59 Tests that perform-undo-perform of the mergeable action does not crash. | |
60 </p> | |
61 | |
62 <div id="container" class="container"></div> | |
63 <div id="other" class="container"></div> | |
64 | |
65 </body> | |
66 </html> | |
OLD | NEW |