| 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 f51624dfaa0be388f5b3027d0bb078cc15224a39..de8d5dd44b749af8d62a6a57613698a3f2399537 100644
|
| --- a/LayoutTests/inspector-protocol/css/css-protocol-test.js
|
| +++ b/LayoutTests/inspector-protocol/css/css-protocol-test.js
|
| @@ -39,6 +39,7 @@ function updateStyleSheetRange(command, styleSheetId, expectError, options, call
|
|
|
| InspectorTest.setPropertyText = updateStyleSheetRange.bind(null, "CSS.setPropertyText");
|
| InspectorTest.setRuleSelector = updateStyleSheetRange.bind(null, "CSS.setRuleSelector");
|
| +InspectorTest.addRule = updateStyleSheetRange.bind(null, "CSS.addRule");
|
|
|
| InspectorTest.requestMainFrameId = function(callback)
|
| {
|
| @@ -85,6 +86,15 @@ InspectorTest.dumpRuleMatch = function(ruleMatch)
|
|
|
| var rule = ruleMatch.rule;
|
| var matchingSelectors = ruleMatch.matchingSelectors;
|
| + var media = rule.media || [];
|
| + var mediaLine = "";
|
| + for (var i = 0; i < media.length; ++i)
|
| + mediaLine += (i > 0 ? " " : "") + media[i].text;
|
| + var baseIndent = 0;
|
| + if (mediaLine.length) {
|
| + log(baseIndent, "@media " + mediaLine);
|
| + baseIndent += 4;
|
| + }
|
| var selectorLine = "";
|
| var selectors = rule.selectorList.selectors;
|
| for (var i = 0; i < selectors.length; ++i) {
|
| @@ -99,15 +109,15 @@ InspectorTest.dumpRuleMatch = function(ruleMatch)
|
| }
|
| selectorLine += " {";
|
| selectorLine += " " + rule.origin;
|
| - log(0, selectorLine);
|
| + log(baseIndent, selectorLine);
|
| var style = rule.style;
|
| var cssProperties = style.cssProperties;
|
| for (var i = 0; i < cssProperties.length; ++i) {
|
| var cssProperty = cssProperties[i];
|
| var propertyLine = cssProperty.name + ": " + cssProperty.value + ";";
|
| - log(4, propertyLine);
|
| + log(baseIndent + 4, propertyLine);
|
| }
|
| - log(0, "}");
|
| + log(baseIndent, "}");
|
| };
|
|
|
| InspectorTest.displayName = function(url)
|
|
|