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

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

Issue 1694433003: DevTools: [CSS] Add CSS.setMultipleStyleTexts command to CSS domain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 10 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
Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
index 86666ae685ca7aa7b7ace9ab89442722c64be5d4..8bc7d8c58359ce52c809178ad4a43eb6db692819 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
@@ -12,7 +12,7 @@ InspectorTest.dumpStyleSheetText = function(styleSheetId, callback)
}
}
-function updateStyleSheetRange(command, styleSheetId, expectError, options, callback)
+function modifyStyleSheet(command, styleSheetId, expectError, options, callback)
{
options.styleSheetId = styleSheetId;
dgozman 2016/02/17 23:32:35 This does not work for multiple edits.
lushnikov 2016/02/18 01:40:16 This affects only styleSheet text to be dumped.
if (expectError)
@@ -37,11 +37,15 @@ function updateStyleSheetRange(command, styleSheetId, expectError, options, call
}
}
-InspectorTest.setPropertyText = updateStyleSheetRange.bind(null, "CSS.setPropertyText");
-InspectorTest.setRuleSelector = updateStyleSheetRange.bind(null, "CSS.setRuleSelector");
-InspectorTest.setStyleText = updateStyleSheetRange.bind(null, "CSS.setStyleText");
-InspectorTest.setMediaText = updateStyleSheetRange.bind(null, "CSS.setMediaText");
-InspectorTest.addRule = updateStyleSheetRange.bind(null, "CSS.addRule");
+InspectorTest.setPropertyText = modifyStyleSheet.bind(null, "CSS.setPropertyText");
+InspectorTest.setRuleSelector = modifyStyleSheet.bind(null, "CSS.setRuleSelector");
+InspectorTest.setMediaText = modifyStyleSheet.bind(null, "CSS.setMediaText");
+InspectorTest.addRule = modifyStyleSheet.bind(null, "CSS.addRule");
+InspectorTest.setStyleTexts = function(styleSheetId, expectError, edits, callback)
+{
+ var options = { edits: edits };
+ modifyStyleSheet("CSS.setStyleTexts", styleSheetId, expectError, options, callback);
+}
InspectorTest.requestMainFrameId = function(callback)
{

Powered by Google App Engine
This is Rietveld 408576698