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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_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/analyze_baselines_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py
index f7a29c43c9119c25e8c26611a4b789e7ca694747..a4c357bb1893d39c2d6bd765b408c484327e6289 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/analyze_baselines_unittest.py
@@ -2,11 +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.checkout.baselineoptimizer import BaselineOptimizer
-from webkitpy.layout_tests.controllers.test_result_writer import TestResultWriter
from webkitpy.tool.commands.analyze_baselines import AnalyzeBaselines
from webkitpy.tool.commands.rebaseline_unittest import BaseTestCase
-from webkitpy.tool.mock_tool import MockOptions
class _FakeOptimizer(BaselineOptimizer):
@@ -29,13 +29,13 @@ class TestAnalyzeBaselines(BaseTestCase):
self.command._write = (lambda msg: self.lines.append(msg))
def test_default(self):
- self.command.execute(MockOptions(suffixes='txt', missing=False, platform=None), ['passes/text.html'], self.tool)
+ self.command.execute(optparse.Values(dict(suffixes='txt', missing=False, platform=None)), ['passes/text.html'], self.tool)
self.assertEqual(self.lines,
['passes/text-expected.txt:',
' (generic): 123456'])
def test_missing_baselines(self):
- self.command.execute(MockOptions(suffixes='png,txt', missing=True, platform=None), ['passes/text.html'], self.tool)
+ self.command.execute(optparse.Values(dict(suffixes='png,txt', missing=True, platform=None)), ['passes/text.html'], self.tool)
self.assertEqual(self.lines,
['passes/text-expected.png: (no baselines found)',
'passes/text-expected.txt:',

Powered by Google App Engine
This is Rietveld 408576698