Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / styles / lazy-computed-style.html
1 <html>
2 <head>
3 <style>
4
5 #inspected {
6     background-color: green;
7     font-family: Times;
8 }
9
10 #inspected {
11     background-color: black;
12     font-family: Courier;
13 }
14
15 #inspected {
16     background: gray;
17 }
18
19 </style>
20 <script src="../../../http/tests/inspector/inspector-test.js"></script>
21 <script src="../../../http/tests/inspector/elements-test.js"></script>
22 <script>
23
24 function test()
25 {
26     InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
27
28     function step1()
29     {
30         InspectorTest.addResult("==== All styles (should be no computed) ====");
31         InspectorTest.dumpSelectedElementStyles(false, false);
32         InspectorTest.addSniffer(WebInspector.ComputedStyleSidebarPane.prototype, "onContentReady", step2);
33         WebInspector.panels.elements.sidebarPanes.computedStyle.expand();
34     }
35
36     function step2()
37     {
38         InspectorTest.addResult("==== All styles (computed should be there) ====");
39         InspectorTest.dumpSelectedElementStyles(false, false);
40         InspectorTest.completeTest();
41     }
42 }
43 </script>
44 </head>
45
46 <body onload="runTest()">
47 <p>
48 Tests that computed styles expand and allow tracing to style rules.
49 </p>
50
51 <div id="inspected">
52 </div>
53
54 </body>
55 </html>