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 4f159df4ff26ba1ac9594f5e46fb1f3c445dec20..07730e1d18aa70d23478e561b7280d8529620239 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); |
+ } |
+} |
+ |
} |