| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import optparse | 5 import optparse |
| 6 | 6 |
| 7 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer | 7 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer |
| 8 from webkitpy.tool.commands.analyze_baselines import AnalyzeBaselines | 8 from webkitpy.tool.commands.analyze_baselines import AnalyzeBaselines |
| 9 from webkitpy.tool.commands.rebaseline_unittest import BaseTestCase | 9 from webkitpy.tool.commands.rebaseline_unittest import BaseTestCase |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 self.command._optimizer_class = _FakeOptimizer | 28 self.command._optimizer_class = _FakeOptimizer |
| 29 self.command._write = (lambda msg: self.lines.append(msg)) | 29 self.command._write = (lambda msg: self.lines.append(msg)) |
| 30 | 30 |
| 31 def test_default(self): | 31 def test_default(self): |
| 32 self.command.execute(optparse.Values(dict(suffixes='txt', missing=False,
platform=None)), ['passes/text.html'], self.tool) | 32 self.command.execute(optparse.Values(dict(suffixes='txt', missing=False,
platform=None)), ['passes/text.html'], self.tool) |
| 33 self.assertEqual(self.lines, | 33 self.assertEqual(self.lines, |
| 34 ['passes/text-expected.txt:', | 34 ['passes/text-expected.txt:', |
| 35 ' (generic): 123456']) | 35 ' (generic): 123456']) |
| 36 | 36 |
| 37 def test_missing_baselines(self): | 37 def test_missing_baselines(self): |
| 38 self.command.execute(optparse.Values(dict(suffixes='png,txt', missing=Tr
ue, platform=None)), ['passes/text.html'], self.tool) | 38 self.command.execute( |
| 39 optparse.Values( |
| 40 dict( |
| 41 suffixes='png,txt', |
| 42 missing=True, |
| 43 platform=None)), |
| 44 ['passes/text.html'], |
| 45 self.tool) |
| 39 self.assertEqual(self.lines, | 46 self.assertEqual(self.lines, |
| 40 ['passes/text-expected.png: (no baselines found)', | 47 ['passes/text-expected.png: (no baselines found)', |
| 41 'passes/text-expected.txt:', | 48 'passes/text-expected.txt:', |
| 42 ' (generic): 123456']) | 49 ' (generic): 123456']) |
| OLD | NEW |