Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles-3 / styles-computed-trace.html
blob24274d125adcbfd0c78247be3ada10692a38228e
1 <html>
2 <head>
3 <style>
4 body {
5 background-color: rgb(100, 0, 0);
6 font-family: Arial;
9 div {
10 text-decoration: underline;
13 #id1 {
14 background-color: green;
15 font-family: Times;
18 #id1 {
19 background-color: black;
20 font-family: Courier;
23 #id1 {
24 background: gray;
27 #id2 {
28 background-color: blue;
29 font-family: Courier;
30 text-decoration: invalidvalue;
33 </style>
34 <script src="../../../http/tests/inspector/inspector-test.js"></script>
35 <script src="../../../http/tests/inspector/elements-test.js"></script>
36 <script>
38 function test()
40 InspectorTest.selectNodeAndWaitForStylesWithComputed("id1", step1);
42 function step1()
44 InspectorTest.addResult("==== Computed style for ID1 ====");
45 InspectorTest.dumpSelectedElementStyles(false, true);
46 InspectorTest.selectNodeAndWaitForStylesWithComputed("id2", step2);
49 function step2()
51 InspectorTest.addResult("==== Computed style for ID2 ====");
52 InspectorTest.dumpSelectedElementStyles(false, true);
53 InspectorTest.selectNodeAndWaitForStylesWithComputed("id3", step3);
56 function step3()
58 InspectorTest.addResult("==== Style for ID3 ====");
59 // The button[hidden] style specifies "display: none", which should not be /-- overloaded --/.
60 InspectorTest.dumpSelectedElementStyles(true, true);
61 InspectorTest.completeTest();
65 </script>
66 </head>
68 <body onload="runTest()">
69 <p>
70 Tests that computed styles expand and allow tracing to style rules.
71 </p>
73 <div id="id1">
74 <div id="id2">
75 </div>
76 <button id="id3" hidden />
77 </div>
79 </body>
80 </html>