Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / inspector / styles / selector-line-deprecated.html
1 <html>
2 <head>
3 <style>
4 #inspected
5 {
6   color: green;
7 }
8 </style>
9 <script src="../inspector-test.js"></script>
10 <script src="../elements-test.js"></script>
11 <script>
12
13 function addStylesheet()
14 {
15     var linkElement = document.createElement("link");
16     linkElement.rel = "stylesheet";
17     linkElement.href = "resources/selector-line-deprecated.css";
18     document.head.appendChild(linkElement);
19 }
20
21 function test()
22 {
23     WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheetAdded, step1, this);
24     InspectorTest.evaluateInPage("addStylesheet()");
25
26     function step1()
27     {
28         WebInspector.showPanel("elements");
29         InspectorTest.selectNodeAndWaitForStyles("inspected", step2);
30     }
31
32     function step2()
33     {
34         InspectorTest.dumpSelectedElementStyles(true);
35         InspectorTest.completeTest();
36     }
37 }
38
39 </script>
40 </head>
41
42 <body onload="runTest()">
43 <p>
44 Tests that selector line is computed correctly regardless of its start column. <a href="https://bugs.webkit.org/show_bug.cgi?id=110732">Bug 110732</a>.
45 </p>
46
47 <div id="container">
48     <div id="inspected">Text</div>
49 </div>
50
51 </body>
52 </html>