OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 | 3 |
4 <style> | 4 <style> |
5 /* c1 */ | 5 /* c1 */ |
6 html | 6 html |
7 #inspected.bar /* c2 */, | 7 #inspected.bar /* c2 */, |
8 /* c3 */ b | 8 /* c3 */ b |
9 /* c4 */ { | 9 /* c4 */ { |
10 text-decoration: none; | 10 text-decoration: none; |
11 } | 11 } |
12 </style> | 12 </style> |
13 | 13 |
14 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 14 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
15 <script src="../../../http/tests/inspector/elements-test.js"></script> | 15 <script src="../../../http/tests/inspector/elements-test.js"></script> |
16 <script> | 16 <script> |
17 | 17 |
18 function test() | 18 function test() |
19 { | 19 { |
20 InspectorTest.nodeWithId("inspected", nodeFound); | 20 InspectorTest.nodeWithId("inspected", nodeFound); |
21 | 21 |
22 function nodeFound(node) | 22 function nodeFound(node) |
23 { | 23 { |
24 InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, stylesLoaded); | 24 InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, stylesLoaded); |
25 } | 25 } |
26 | 26 |
27 function stylesLoaded(error, rules) | 27 function stylesLoaded(error, inlineStyle, attributeStyle, rules) |
28 { | 28 { |
29 if (error) { | 29 if (error) { |
30 InspectorTest.addResult("Failed to get styles: " + error); | 30 InspectorTest.addResult("Failed to get styles: " + error); |
31 return; | 31 return; |
32 } | 32 } |
33 InspectorTest.dumpRuleMatchesArray(rules); | 33 InspectorTest.dumpRuleMatchesArray(rules); |
34 InspectorTest.completeTest(); | 34 InspectorTest.completeTest(); |
35 } | 35 } |
36 } | 36 } |
37 </script> | 37 </script> |
38 </head> | 38 </head> |
39 | 39 |
40 <body onload="runTest()"> | 40 <body onload="runTest()"> |
41 <p> | 41 <p> |
42 Tests that WebInspector.CSSStyleSheet methods work as expected. | 42 Tests that WebInspector.CSSStyleSheet methods work as expected. |
43 </p> | 43 </p> |
44 <h1 id="inspected" class="bar">Inspect Me</h1> | 44 <h1 id="inspected" class="bar">Inspect Me</h1> |
45 </body> | 45 </body> |
46 </html> | 46 </html> |
OLD | NEW |