Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / styles / styles-disable-then-delete.html
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     InspectorTest.selectNodeAndWaitForStyles("container", step1);
10
11     function step1()
12     {
13         // Disable property
14         InspectorTest.addResult("Before disable");
15         InspectorTest.dumpSelectedElementStyles(true, true);
16         InspectorTest.toggleStyleProperty("font-weight", false);
17         InspectorTest.runAfterPendingDispatches(step2);
18     }
19
20     function step2()
21     {
22         // Delete style
23         InspectorTest.addResult("After disable");
24         InspectorTest.dumpSelectedElementStyles(true, true);
25
26         var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
27         treeItem.applyStyleText("", true);
28
29         InspectorTest.runAfterPendingDispatches(step3);
30     }
31
32     function step3()
33     {
34         InspectorTest.selectNodeWithId("other");
35         InspectorTest.runAfterPendingDispatches(step4);
36     }
37
38     function step4()
39     {
40         InspectorTest.selectNodeAndWaitForStyles("container", step5);
41     }
42
43     function step5(node)
44     {
45         InspectorTest.addResult("After delete");
46         InspectorTest.dumpSelectedElementStyles(true, true);
47         InspectorTest.completeTest();
48     }
49 }
50 </script>
51 </head>
52
53 <body onload="runTest()">
54 <p>
55 Tests that removal of property following its disabling works.
56 </p>
57
58 <div id="container" style="font-weight:bold">
59 </div>
60
61 <div id="other">
62 </div>
63
64 </body>
65 </html>