| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> | |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
| 6 <link rel="stylesheet" href="resources/empty-background-url.css"> | |
| 7 <style> | |
| 8 #inspected { | |
| 9 color: blue; | |
| 10 } | |
| 11 </style> | |
| 12 <style>#inspected { margin: 10px; } | |
| 13 #inspected { | |
| 14 font-family: arial; | |
| 15 } | |
| 16 /*# sourceURL=source-url.css */ | |
| 17 </style> | |
| 18 <script> | |
| 19 function test() | |
| 20 { | |
| 21 InspectorTest.waitForScriptSource("source-url.css", onUISourceCodeCreated); | |
| 22 | |
| 23 function onUISourceCodeCreated() | |
| 24 { | |
| 25 InspectorTest.nodeWithId("inspected", onNodeFound); | |
| 26 } | |
| 27 | |
| 28 function onNodeFound(node) | |
| 29 { | |
| 30 InspectorTest.cssModel.getMatchedStylesAsync(node.id, true, false, onMat
chedStyles); | |
| 31 } | |
| 32 | |
| 33 function onMatchedStyles(styles) | |
| 34 { | |
| 35 var rules = styles.matchedCSSRules; | |
| 36 for (var rule of rules) { | |
| 37 var properties = rule.style.allProperties; | |
| 38 for (var property of properties) { | |
| 39 if (property.styleBased) | |
| 40 continue; | |
| 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)); | |
| 43 } | |
| 44 } | |
| 45 InspectorTest.completeTest(); | |
| 46 } | |
| 47 } | |
| 48 </script> | |
| 49 </head> | |
| 50 <body onload="runTest()"> | |
| 51 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality</p
> | |
| 52 <div id="inspected"></div> | |
| 53 </body> | |
| 54 </html> | |
| OLD | NEW |