Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Side by Side Diff: LayoutTests/http/tests/inspector/elements/styles/selector-line-deprecated.html

Issue 297923002: DevTools: Decouple CSS model from UI entities (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase atop new workspace bindings Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 #inspected 4 #inspected
5 { 5 {
6 color: green; 6 color: green;
7 } 7 }
8 </style> 8 </style>
9 <script src="../../inspector-test.js"></script> 9 <script src="../../inspector-test.js"></script>
10 <script src="../../elements-test.js"></script> 10 <script src="../../elements-test.js"></script>
11 <script> 11 <script>
12 12
13 function addStylesheet() 13 function addStylesheet()
14 { 14 {
15 var linkElement = document.createElement("link"); 15 var linkElement = document.createElement("link");
16 linkElement.rel = "stylesheet"; 16 linkElement.rel = "stylesheet";
17 linkElement.href = "resources/selector-line-deprecated.css"; 17 linkElement.href = "resources/selector-line-deprecated.css";
18 document.head.appendChild(linkElement); 18 document.head.appendChild(linkElement);
19 } 19 }
20 20
21 function test() 21 function test()
22 { 22 {
23 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty leSheetAdded, step1, this); 23 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Sty leSheetAdded, step1, this);
24 InspectorTest.evaluateInPage("addStylesheet()"); 24 InspectorTest.evaluateInPage("addStylesheet()");
25 25
26 function step1() 26 function step1()
27 { 27 {
28 InspectorTest.addSniffer(WebInspector.CSSStyleSheetHeader.prototype, "pu shSourceMapping", sourceMappingSniffer, true); 28 InspectorTest.addSniffer(WebInspector.CSSWorkspaceBinding.prototype, "pu shSourceMapping", sourceMappingSniffer, true);
29 29
30 function sourceMappingSniffer(sourceMapping) 30 function sourceMappingSniffer(header, sourceMapping)
31 { 31 {
32 if (sourceMapping instanceof WebInspector.SASSSourceMapping) { 32 if (sourceMapping instanceof WebInspector.SASSSourceMapping) {
33 WebInspector.inspectorView.showPanel("elements"); 33 WebInspector.inspectorView.showPanel("elements");
34 InspectorTest.selectNodeAndWaitForStyles("inspected", step2); 34 InspectorTest.selectNodeAndWaitForStyles("inspected", step2);
35 } 35 }
36 } 36 }
37 } 37 }
38 38
39 function step2() 39 function step2()
40 { 40 {
41 InspectorTest.dumpSelectedElementStyles(true); 41 InspectorTest.dumpSelectedElementStyles(true);
42 InspectorTest.completeTest(); 42 InspectorTest.completeTest();
43 } 43 }
44 } 44 }
45 45
46 </script> 46 </script>
47 </head> 47 </head>
48 48
49 <body onload="runTest()"> 49 <body onload="runTest()">
50 <p> 50 <p>
51 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>. 51 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>.
52 </p> 52 </p>
53 53
54 <div id="container"> 54 <div id="container">
55 <div id="inspected">Text</div> 55 <div id="inspected">Text</div>
56 </div> 56 </div>
57 57
58 </body> 58 </body>
59 </html> 59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698