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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/styles-2/property-ui-location.html

Issue 1943763002: DevTools: [SASS] fix CSSWorkspaceBinding.propertyUILocation to account for comments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@super-sass
Patch Set: fix tests Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-2/property-ui-location-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script src="../../../http/tests/inspector/debugger-test.js"></script> 5 <script src="../../../http/tests/inspector/debugger-test.js"></script>
6 <link rel="stylesheet" href="../styles/resources/empty-background-url.css"> 6 <link rel="stylesheet" href="../styles/resources/empty-background-url.css">
7 <style> 7 <style>
8 #inspected { 8 #inspected {
9 color: blue; 9 color: blue;
10 } 10 }
11 </style> 11 </style>
12 <style>#inspected { margin: 10px; } 12 <style>#inspected { margin: 10px; }
13 #inspected { 13 #inspected {
14 font-family: arial; 14 font-family: arial;
15 /* font-size: 20px; */
15 } 16 }
16 /*# sourceURL=source-url.css */ 17 /*# sourceURL=source-url.css */
17 </style> 18 </style>
18 <script> 19 <script>
19 function test() 20 function test()
20 { 21 {
21 InspectorTest.waitForScriptSource("source-url.css", onUISourceCodeCreated); 22 InspectorTest.waitForScriptSource("source-url.css", onUISourceCodeCreated);
22 23
23 function onUISourceCodeCreated() 24 function onUISourceCodeCreated()
24 { 25 {
25 InspectorTest.nodeWithId("inspected", onNodeFound); 26 InspectorTest.nodeWithId("inspected", onNodeFound);
26 } 27 }
27 28
28 function onNodeFound(node) 29 function onNodeFound(node)
29 { 30 {
30 InspectorTest.cssModel.matchedStylesPromise(node.id).then(onMatchedStyle s); 31 InspectorTest.cssModel.matchedStylesPromise(node.id).then(onMatchedStyle s);
31 } 32 }
32 33
33 function onMatchedStyles(matchedResult) 34 function onMatchedStyles(matchedResult)
34 { 35 {
35 var styles = matchedResult.nodeStyles(); 36 var styles = matchedResult.nodeStyles();
36 for (var style of styles) { 37 for (var style of styles) {
37 if (style.type !== WebInspector.CSSStyleDeclaration.Type.Regular) 38 if (style.type !== WebInspector.CSSStyleDeclaration.Type.Regular)
38 continue; 39 continue;
39 var properties = style.allProperties; 40 var properties = style.allProperties;
40 for (var property of properties) { 41 for (var property of properties) {
41 if (!property.range) 42 if (!property.range)
42 continue; 43 continue;
43 var uiLocation = WebInspector.cssWorkspaceBinding.propertyUILoca tion(property, true); 44 var uiLocation = WebInspector.cssWorkspaceBinding.propertyUILoca tion(property, true);
44 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert y.text, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.column Number)); 45 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert y.name, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.column Number));
46 var uiLocation = WebInspector.cssWorkspaceBinding.propertyUILoca tion(property, false);
47 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert y.value, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.colum nNumber));
45 } 48 }
46 } 49 }
47 InspectorTest.completeTest(); 50 InspectorTest.completeTest();
48 } 51 }
49 } 52 }
50 </script> 53 </script>
51 </head> 54 </head>
52 <body onload="runTest()"> 55 <body onload="runTest()">
53 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality</p > 56 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality</p >
54 <div id="inspected"></div> 57 <div id="inspected"></div>
55 </body> 58 </body>
56 </html> 59 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/elements/styles-2/property-ui-location-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698