[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / inspector / styles / styles-disable-then-enable.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(node)
12     {
13         InspectorTest.addResult("Before disable");
14         var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
15         InspectorTest.dumpStyleTreeItem(treeItem, "");
16
17         treeItem.toggleEnabled({ target: { checked: false } });
18         InspectorTest.waitForStyles("container", step2);
19     }
20
21     function step2()
22     {
23         InspectorTest.addResult("After disable");
24         var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
25         InspectorTest.dumpStyleTreeItem(treeItem, "");
26
27         treeItem.toggleEnabled({ target: { checked: true } });
28         InspectorTest.waitForStyles("container", step3);
29     }
30
31     function step3()
32     {
33         InspectorTest.addResult("After enable");
34         var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
35         InspectorTest.dumpStyleTreeItem(treeItem, "");
36
37         InspectorTest.completeTest();
38     }
39 }
40 </script>
41 </head>
42
43 <body onload="runTest()">
44 <p>
45 Tests that disabling style property works.
46 </p>
47
48 <div id="container" style="font-weight:bold">
49 </div>
50
51 </body>
52 </html>