Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles / undo-property-toggle.html
blobc300b25328f36bf391b957b48f01a41c65418c78
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 InspectorTest.selectNodeAndWaitForStyles("container", step1);
11 function step1(node)
13 InspectorTest.addResult("Before disable");
14 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
15 InspectorTest.dumpStyleTreeItem(treeItem, "");
17 InspectorTest.toggleStyleProperty("font-weight", false);
18 InspectorTest.waitForStyles("container", step2);
21 function step2()
23 InspectorTest.addResult("After disable");
24 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
25 InspectorTest.dumpStyleTreeItem(treeItem, "");
27 InspectorTest.domModel.undo();
28 InspectorTest.waitForStyles("container", step3);
31 function step3()
33 InspectorTest.addResult("After undo");
34 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
35 InspectorTest.dumpStyleTreeItem(treeItem, "");
37 InspectorTest.domModel.redo();
38 InspectorTest.waitForStyles("container", step4);
41 function step4()
43 InspectorTest.addResult("After redo");
44 var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
45 InspectorTest.dumpStyleTreeItem(treeItem, "");
46 InspectorTest.completeTest();
49 </script>
50 </head>
52 <body onload="runTest()">
53 <p>
54 Tests that disabling style is undone properly.
55 </p>
57 <div id="container" style="font-weight:bold">
58 </div>
60 </body>
61 </html>