Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: LayoutTests/http/tests/inspector-protocol/css-protocol-test.js

Issue 1211813002: DevTools: allow injecting CSS rules without breaking styles sidebar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
diff --git a/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js b/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
index eddb230d441c1f98aff520aeac526b4eccbbe75b..461811809fb82619cf5751dcd23289f866949a3f 100644
--- a/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
+++ b/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
@@ -92,6 +92,8 @@ InspectorTest.dumpRuleMatch = function(ruleMatch)
}
selectorLine += " {";
selectorLine += " " + rule.origin;
+ if (!rule.style.styleSheetId)
+ selectorLine += " readonly";
indentLog(baseIndent, selectorLine);
InspectorTest.dumpStyle(rule.style, baseIndent);
indentLog(baseIndent, "}");
@@ -114,15 +116,17 @@ InspectorTest.displayName = function(url)
return url.substr(url.lastIndexOf("/") + 1);
};
-InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback)
+InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback, omitLog)
{
InspectorTest.sendCommandOrDie("CSS.getMatchedStylesForNode", { "nodeId": nodeId }, matchingRulesLoaded);
function matchingRulesLoaded(result)
{
- InspectorTest.log("Dumping matched rules: ");
+ if (!omitLog)
+ InspectorTest.log("Dumping matched rules: ");
dumpRuleMatches(result.matchedCSSRules);
- InspectorTest.log("Dumping inherited rules: ");
+ if (!omitLog)
+ InspectorTest.log("Dumping inherited rules: ");
for (var inheritedEntry of result.inherited) {
InspectorTest.dumpStyle(inheritedEntry.inlineStyle);
dumpRuleMatches(inheritedEntry.matchedCSSRules);
@@ -141,13 +145,13 @@ InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback)
}
}
-InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, callback)
+InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, callback, omitLog)
{
InspectorTest.requestNodeId(documentNodeId, selector, nodeIdLoaded);
function nodeIdLoaded(nodeId)
{
- InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback);
+ InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog);
}
}
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698