| OLD | NEW |
| 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 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 function onNodeFound(node) | 29 function onNodeFound(node) |
| 30 { | 30 { |
| 31 InspectorTest.cssModel.matchedStylesPromise(node.id).then(onMatchedStyle
s); | 31 InspectorTest.cssModel.matchedStylesPromise(node.id).then(onMatchedStyle
s); |
| 32 } | 32 } |
| 33 | 33 |
| 34 function onMatchedStyles(matchedResult) | 34 function onMatchedStyles(matchedResult) |
| 35 { | 35 { |
| 36 var styles = matchedResult.nodeStyles(); | 36 var styles = matchedResult.nodeStyles(); |
| 37 for (var style of styles) { | 37 for (var style of styles) { |
| 38 if (style.type !== WebInspector.CSSStyleDeclaration.Type.Regular) | 38 if (style.type !== SDK.CSSStyleDeclaration.Type.Regular) |
| 39 continue; | 39 continue; |
| 40 var properties = style.allProperties; | 40 var properties = style.allProperties; |
| 41 for (var property of properties) { | 41 for (var property of properties) { |
| 42 if (!property.range) | 42 if (!property.range) |
| 43 continue; | 43 continue; |
| 44 var uiLocation = WebInspector.cssWorkspaceBinding.propertyUILoca
tion(property, true); | 44 var uiLocation = Bindings.cssWorkspaceBinding.propertyUILocation
(property, true); |
| 45 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert
y.name, 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); | 46 var uiLocation = Bindings.cssWorkspaceBinding.propertyUILocation
(property, false); |
| 47 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert
y.value, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.colum
nNumber)); | 47 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert
y.value, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.colum
nNumber)); |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 InspectorTest.completeTest(); | 50 InspectorTest.completeTest(); |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 </script> | 53 </script> |
| 54 </head> | 54 </head> |
| 55 <body onload="runTest()"> | 55 <body onload="runTest()"> |
| 56 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality</p
> | 56 <p>Verifies Bindings.cssWorkspaceBinding.propertyUILocation functionality</p> |
| 57 <div id="inspected"></div> | 57 <div id="inspected"></div> |
| 58 </body> | 58 </body> |
| 59 </html> | 59 </html> |
| OLD | NEW |