Index: LayoutTests/inspector-protocol/css/css-protocol-test.js |
diff --git a/LayoutTests/inspector-protocol/css/css-protocol-test.js b/LayoutTests/inspector-protocol/css/css-protocol-test.js |
index e1b54e3be0d43f3479c87e898a24764299c6c297..ec14c5a67508816b6e7199353a81350787319d80 100644 |
--- a/LayoutTests/inspector-protocol/css/css-protocol-test.js |
+++ b/LayoutTests/inspector-protocol/css/css-protocol-test.js |
@@ -120,14 +120,9 @@ InspectorTest.displayName = function(url) |
return url.substr(url.lastIndexOf("/") + 1); |
}; |
-InspectorTest.loadAndDumpMatchingRules = function(nodeId, callback) |
+InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback) |
{ |
- InspectorTest.requestNodeId(nodeId, nodeIdLoaded); |
- |
- function nodeIdLoaded(nodeId) |
- { |
- InspectorTest.sendCommandOrDie("CSS.getMatchedStylesForNode", { "nodeId": nodeId }, matchingRulesLoaded); |
- } |
+ InspectorTest.sendCommandOrDie("CSS.getMatchedStylesForNode", { "nodeId": nodeId }, matchingRulesLoaded); |
function matchingRulesLoaded(result) |
{ |
@@ -144,4 +139,14 @@ InspectorTest.loadAndDumpMatchingRules = function(nodeId, callback) |
} |
} |
+InspectorTest.loadAndDumpMatchingRules = function(selector, callback) |
+{ |
+ InspectorTest.requestNodeId(selector, nodeIdLoaded); |
+ |
+ function nodeIdLoaded(nodeId) |
+ { |
+ InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback); |
+ } |
+} |
+ |
} |