Chromium Code Reviews| 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) |
| { |