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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py

Issue 2192403002: Remove MockOptions, and replace all usages of it with optparse.Values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py
index 9242a8b277d60d1b6eec3b2e8bb5a09f5f3e625a..a4bdc0d795cd909b144540a2c26b1f0e8c8db4e8 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py
@@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import optparse
+
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.commands.optimize_baselines import OptimizeBaselines
from webkitpy.tool.commands.rebaseline_unittest import BaseTestCase
-from webkitpy.tool.mock_tool import MockOptions
class TestOptimizeBaselines(BaseTestCase):
@@ -25,7 +26,7 @@ class TestOptimizeBaselines(BaseTestCase):
self._write_test_file(test_port, 'another/test-expected.txt', "result A")
OutputCapture().assert_outputs(self, self.command.execute, args=[
- MockOptions(suffixes='txt', no_modify_scm=False, platform='test-mac-mac10.10'),
+ optparse.Values({'suffixes': 'txt', 'no_modify_scm': False, 'platform': 'test-mac-mac10.10'}),
['another/test.html'],
self.tool,
], expected_stdout='{"add": [], "remove-lines": [], "delete": []}\n')
@@ -42,7 +43,7 @@ class TestOptimizeBaselines(BaseTestCase):
self._write_test_file(test_port, 'another/test-expected.txt', "result A")
OutputCapture().assert_outputs(self, self.command.execute, args=[
- MockOptions(suffixes='txt', no_modify_scm=True, platform='test-mac-mac10.10'),
+ optparse.Values({'suffixes': 'txt', 'no_modify_scm': True, 'platform': 'test-mac-mac10.10'}),
['another/test.html'],
self.tool,
], expected_stdout='{"add": [], "remove-lines": [], "delete": ["/test.checkout/LayoutTests/platform/test-mac-mac10.10/another/test-expected.txt"]}\n')
@@ -63,9 +64,10 @@ class TestOptimizeBaselines(BaseTestCase):
try:
oc = OutputCapture()
oc.capture_output()
- self.command.execute(MockOptions(suffixes='txt,wav,png', no_modify_scm=True, platform='test-mac-mac10.10'),
- ['another/test.html'],
- self.tool)
+ self.command.execute(
+ optparse.Values({'suffixes': 'txt,wav,png', 'no_modify_scm': True, 'platform': 'test-mac-mac10.10'}),
+ ['another/test.html'],
+ self.tool)
finally:
out, _, _ = oc.restore_output()

Powered by Google App Engine
This is Rietveld 408576698