[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / inspector / styles / show-user-agent-styles.html
1 <html>
2 <head>
3
4 <style>
5 h1 {
6     background-color: red;
7 }
8 </style>
9
10 <script src="../../http/tests/inspector/inspector-test.js"></script>
11 <script src="../../http/tests/inspector/elements-test.js"></script>
12 <script>
13
14 function test()
15 {
16     InspectorTest.runTestSuite([
17         function testShowUserAgentStyles(next)
18         {
19             WebInspector.settings.showUserAgentStyles.set(true);
20             selectNodeAndDumpStyles("inspected", next);
21         },
22
23         function testShowUserAgentStyles(next)
24         {
25             WebInspector.settings.showUserAgentStyles.set(false);
26             selectNodeAndDumpStyles("other", next);
27         }
28     ]);
29
30     function selectNodeAndDumpStyles(nodeId, next)
31     {
32         InspectorTest.addResult("WebInspector.settings.showUserAgentStyles = " + WebInspector.settings.showUserAgentStyles.get());
33         InspectorTest.selectNodeAndWaitForStyles(nodeId, step1);
34
35         function step1()
36         {
37             InspectorTest.dumpSelectedElementStyles(true, false, true);
38             WebInspector.settings.showUserAgentStyles.set(true);
39             next();
40         }
41     }
42 }
43
44 </script>
45 </head>
46
47 <body onload="runTest()">
48 <p>
49 Tests that user agent styles are shown based on the setting: https://bugs.webkit.org/show_bug.cgi?id=37766.
50 </p>
51 <h1 id="inspected">
52 I'm red.
53 </h1>
54 <h1 id="other">
55 I'm also red.
56 </h1>
57 </body>
58 </html>