| 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 18 matching lines...) Expand all Loading... |
| 29 { | 29 { |
| 30 InspectorTest.cssModel.matchedStylesPromise(node.id, true, false).then(o
nMatchedStyles); | 30 InspectorTest.cssModel.matchedStylesPromise(node.id, true, false).then(o
nMatchedStyles); |
| 31 } | 31 } |
| 32 | 32 |
| 33 function onMatchedStyles(styles) | 33 function onMatchedStyles(styles) |
| 34 { | 34 { |
| 35 var rules = styles.matchedCSSRules; | 35 var rules = styles.matchedCSSRules; |
| 36 for (var rule of rules) { | 36 for (var rule of rules) { |
| 37 var properties = rule.style.allProperties; | 37 var properties = rule.style.allProperties; |
| 38 for (var property of properties) { | 38 for (var property of properties) { |
| 39 if (property.styleBased) | 39 if (!property.range) |
| 40 continue; | 40 continue; |
| 41 var uiLocation = WebInspector.cssWorkspaceBinding.propertyUILoca
tion(property, true); | 41 var uiLocation = WebInspector.cssWorkspaceBinding.propertyUILoca
tion(property, true); |
| 42 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert
y.text, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.column
Number)); | 42 InspectorTest.addResult(String.sprintf("%s -> %s:%d:%d", propert
y.text, uiLocation.uiSourceCode.name(), uiLocation.lineNumber, uiLocation.column
Number)); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 InspectorTest.completeTest(); | 45 InspectorTest.completeTest(); |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 </script> | 48 </script> |
| 49 </head> | 49 </head> |
| 50 <body onload="runTest()"> | 50 <body onload="runTest()"> |
| 51 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality</p
> | 51 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality</p
> |
| 52 <div id="inspected"></div> | 52 <div id="inspected"></div> |
| 53 </body> | 53 </body> |
| 54 </html> | 54 </html> |
| OLD | NEW |