Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / edit / perform-undo-undo.html
blobce590bea4c7237c3aff77cdde7113fc0004a20cd
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>
7 function test()
9 var containerNode;
10 InspectorTest.expandElementsTree(step1);
12 function step1(node)
14 containerNode = InspectorTest.expandedNodeWithId("container");
15 InspectorTest.addResult("========= Original ========");
16 InspectorTest.dumpElementsTree(containerNode);
17 step2();
20 function step2()
22 function callback()
24 InspectorTest.addResult("===== Modified element =====");
25 InspectorTest.dumpElementsTree(containerNode);
26 step3();
28 containerNode.setAttribute("", "foo=\"bar\"", callback);
31 function step3()
33 function callback()
35 InspectorTest.addResult("===== Undo 1 =====");
36 InspectorTest.dumpElementsTree(containerNode);
37 step4();
39 InspectorTest.domModel.undo(callback);
42 function step4()
44 function callback()
46 InspectorTest.addResult("===== Undo 2 =====");
47 InspectorTest.dumpElementsTree(containerNode);
48 InspectorTest.completeTest();
50 InspectorTest.domModel.undo(callback);
54 </script>
55 </head>
57 <body onload="runTest()">
58 <p>
59 Tests that client can call undo multiple times with non-empty history.
60 </p>
62 <div style="display:none" id="container">
63 </div>
65 </body>
66 </html>