Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / styles / styles-disable-then-enable-overriden-ua.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
6 <script>
7
8 function injectStyleSheet()
9 {
10     var styleSheet = "#container { margin: 8px }";
11     if (window.testRunner)
12         window.testRunner.injectStyleSheet(styleSheet, true);
13 }
14
15 function test()
16 {
17     InspectorTest.evaluateInPage("injectStyleSheet()", step1);
18     function step1()
19     {
20         InspectorTest.selectNodeAndWaitForStyles("container", step2);
21     }
22
23     function step2()
24     {
25         InspectorTest.addResult("Before disable");
26         InspectorTest.dumpSelectedElementStyles(true, false, true);
27         InspectorTest.toggleStyleProperty("margin", false);
28         InspectorTest.waitForStyles("container", step3);
29     }
30
31     function step3()
32     {
33         InspectorTest.addResult("After disable");
34         InspectorTest.dumpSelectedElementStyles(true, false, true);
35         InspectorTest.toggleStyleProperty("margin", true);
36         InspectorTest.waitForStyles("container", step4);
37     }
38
39     function step4()
40     {
41         InspectorTest.addResult("After enable");
42         InspectorTest.dumpSelectedElementStyles(true, false, true);
43         InspectorTest.completeTest();
44     }
45 }
46 </script>
47 </head>
48
49 <body onload="runTest()" id="body-id">
50 <p>
51 Tests that disabling shorthand removes the "overriden" mark from the UA shorthand it overrides.
52 </p>
53
54 <div id="container" style="margin: 10px"></div>
55
56 </body>
57 </html>