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 <script> | |
6 | |
7 function test() | |
8 { | |
9 var containerNode; | |
10 InspectorTest.expandElementsTree(step1); | |
11 | |
12 function step1(node) | |
13 { | |
14 containerNode = InspectorTest.expandedNodeWithId("container"); | |
15 InspectorTest.addResult("========= Original ========"); | |
16 InspectorTest.dumpElementsTree(containerNode); | |
17 step2(); | |
18 } | |
19 | |
20 function step2() | |
21 { | |
22 function callback() | |
23 { | |
24 InspectorTest.addResult("===== Modified element ====="); | |
25 InspectorTest.dumpElementsTree(containerNode); | |
26 step3(); | |
27 } | |
28 containerNode.setAttribute("", "foo=\"bar\"", callback); | |
29 } | |
30 | |
31 function step3() | |
32 { | |
33 function callback() | |
34 { | |
35 InspectorTest.addResult("===== Undo 1 ====="); | |
36 InspectorTest.dumpElementsTree(containerNode); | |
37 step4(); | |
38 } | |
39 InspectorTest.domModel.undo(callback); | |
40 } | |
41 | |
42 function step4() | |
43 { | |
44 function callback() | |
45 { | |
46 InspectorTest.addResult("===== Undo 2 ====="); | |
47 InspectorTest.dumpElementsTree(containerNode); | |
48 InspectorTest.completeTest(); | |
49 } | |
50 InspectorTest.domModel.undo(callback); | |
51 } | |
52 } | |
53 | |
54 </script> | |
55 </head> | |
56 | |
57 <body onload="runTest()"> | |
58 <p> | |
59 Tests that client can call undo multiple times with non-empty history. | |
60 </p> | |
61 | |
62 <div style="display:none" id="container"> | |
63 </div> | |
64 | |
65 </body> | |
66 </html> | |
OLD | NEW |