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

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: %zu is not cross-platform - do not use. 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-style-text.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..746727e3d442b3613c7ae7b8de8f489a87b17346 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,9 +12,10 @@ InspectorTest.dumpStyleSheetText = function(styleSheetId, callback)
}
}
-function updateStyleSheetRange(command, styleSheetId, expectError, options, callback)
+function modifyStyleSheet(command, presetStyleSheetId, styleSheetId, expectError, options, callback)
{
- options.styleSheetId = styleSheetId;
+ if (presetStyleSheetId)
+ options.styleSheetId = styleSheetId;
if (expectError)
InspectorTest.sendCommand(command, options, onResponse);
else
@@ -37,11 +38,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", true);
+InspectorTest.setRuleSelector = modifyStyleSheet.bind(null, "CSS.setRuleSelector", true);
+InspectorTest.setMediaText = modifyStyleSheet.bind(null, "CSS.setMediaText", true);
+InspectorTest.addRule = modifyStyleSheet.bind(null, "CSS.addRule", true);
+InspectorTest.setStyleTexts = function(styleSheetId, expectError, edits, callback)
+{
+ var options = { edits: edits };
+ modifyStyleSheet("CSS.setStyleTexts", false, styleSheetId, expectError, options, callback);
+}
InspectorTest.requestMainFrameId = function(callback)
{
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/css/css-set-inline-style-text.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698