}
}
-InspectorTest.setPropertyText = function(styleSheetId, expectError, options, callback)
+function updateStyleSheetRange(command, styleSheetId, expectError, options, callback)
{
- var styleId = { styleSheetId: styleSheetId, ordinal: options.styleIndex };
- delete options.styleIndex;
- options.styleId = styleId;
+ options.styleSheetId = styleSheetId;
if (expectError)
- InspectorTest.sendCommand("CSS.setPropertyText", options, onResponse);
+ InspectorTest.sendCommand(command, options, onResponse);
else
- InspectorTest.sendCommandOrDie("CSS.setPropertyText", options, onSuccess);
+ InspectorTest.sendCommandOrDie(command, options, onSuccess);
function onSuccess()
{
}
}
+InspectorTest.setPropertyText = updateStyleSheetRange.bind(null, "CSS.setPropertyText");
+InspectorTest.setRuleSelector = updateStyleSheetRange.bind(null, "CSS.setRuleSelector");
+
InspectorTest.requestMainFrameId = function(callback)
{
InspectorTest.sendCommandOrDie("Page.enable", {}, pageEnabled);
selectorLine += "*";
}
selectorLine += " {";
- selectorLine += " " + rule.origin + (rule.sourceURL ? " (" + InspectorTest.displayName(rule.sourceURL) + ")" : "");
+ selectorLine += " " + rule.origin;
log(0, selectorLine);
var style = rule.style;
var cssProperties = style.cssProperties;