Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector-protocol / css / css-protocol-test.js
index 3c05da9..4f159df 100644 (file)
@@ -12,15 +12,13 @@ InspectorTest.dumpStyleSheetText = function(styleSheetId, callback)
     }
 }
 
-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()
     {
@@ -39,6 +37,9 @@ InspectorTest.setPropertyText = function(styleSheetId, expectError, options, cal
     }
 }
 
+InspectorTest.setPropertyText = updateStyleSheetRange.bind(null, "CSS.setPropertyText");
+InspectorTest.setRuleSelector = updateStyleSheetRange.bind(null, "CSS.setRuleSelector");
+
 InspectorTest.requestMainFrameId = function(callback)
 {
     InspectorTest.sendCommandOrDie("Page.enable", {}, pageEnabled);
@@ -102,7 +103,7 @@ InspectorTest.dumpRuleMatch = function(ruleMatch)
             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;