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=
"../styles/resources/empty-background-url.css">
12 <style>#inspected { margin:
10px; }
16 /*# sourceURL=source-url.css */
21 InspectorTest
.waitForScriptSource("source-url.css", onUISourceCodeCreated
);
23 function onUISourceCodeCreated()
25 InspectorTest
.nodeWithId("inspected", onNodeFound
);
28 function onNodeFound(node
)
30 InspectorTest
.cssModel
.matchedStylesPromise(node
.id
, true, false).then(onMatchedStyles
);
33 function onMatchedStyles(styles
)
35 var rules
= styles
.matchedCSSRules
;
36 for (var rule
of rules
) {
37 var properties
= rule
.style
.allProperties
;
38 for (var property
of properties
) {
41 var uiLocation
= WebInspector
.cssWorkspaceBinding
.propertyUILocation(property
, true);
42 InspectorTest
.addResult(String
.sprintf("%s -> %s:%d:%d", property
.text
, uiLocation
.uiSourceCode
.name(), uiLocation
.lineNumber
, uiLocation
.columnNumber
));
45 InspectorTest
.completeTest();
50 <body onload=
"runTest()">
51 <p>Verifies WebInspector.cssWorkspaceBinding.propertyUILocation functionality
</p>
52 <div id=
"inspected"></div>