Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / styles / styles-disable-then-change.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         InspectorTest.addResult("Before disable");
14         InspectorTest.dumpSelectedElementStyles(true, true);
15
16         InspectorTest.toggleStyleProperty("font-weight", false);
17         InspectorTest.waitForStyles("container", step2);
18     }
19
20     function step2()
21     {
22         InspectorTest.addResult("After disable");
23         InspectorTest.dumpSelectedElementStyles(true, true);
24
25         var treeItem = InspectorTest.getElementStylePropertyTreeItem("font-weight");
26         treeItem.applyStyleText("color: green", true);
27         InspectorTest.waitForStyles("container", step3);
28     }
29
30     function step3()
31     {
32         InspectorTest.addResult("After change");
33         InspectorTest.dumpSelectedElementStyles(true, true);
34         InspectorTest.completeTest();
35     }
36 }
37 </script>
38 </head>
39
40 <body onload="runTest()">
41 <p>
42 Tests that changing a disabled property enables it as well.
43 </p>
44
45 <div id="container" style="font-weight:bold">
46 </div>
47
48 <div id="other">
49 </div>
50
51 </body>
52 </html>