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