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.system.outputcapture import OutputCapture | 7 from webkitpy.common.system.output_capture import OutputCapture |
8 from webkitpy.tool.commands.optimize_baselines import OptimizeBaselines | 8 from webkitpy.tool.commands.optimize_baselines import OptimizeBaselines |
9 from webkitpy.tool.commands.rebaseline_unittest import BaseTestCase | 9 from webkitpy.tool.commands.rebaseline_unittest import BaseTestCase |
10 | 10 |
11 | 11 |
12 class TestOptimizeBaselines(BaseTestCase): | 12 class TestOptimizeBaselines(BaseTestCase): |
13 command_constructor = OptimizeBaselines | 13 command_constructor = OptimizeBaselines |
14 | 14 |
15 def _write_test_file(self, port, path, contents): | 15 def _write_test_file(self, port, path, contents): |
16 abs_path = self.tool.filesystem.join(port.layout_tests_dir(), path) | 16 abs_path = self.tool.filesystem.join(port.layout_tests_dir(), path) |
17 self.tool.filesystem.write_text_file(abs_path, contents) | 17 self.tool.filesystem.write_text_file(abs_path, contents) |
(...skipping 24 matching lines...) Expand all Loading... |
42 test_port.layout_tests_dir(), 'platform/mac/another/test-expecte
d.txt'))) | 42 test_port.layout_tests_dir(), 'platform/mac/another/test-expecte
d.txt'))) |
43 self.assertFalse( | 43 self.assertFalse( |
44 self.tool.filesystem.exists(self.tool.filesystem.join( | 44 self.tool.filesystem.exists(self.tool.filesystem.join( |
45 test_port.layout_tests_dir(), 'platform/mac/another/test-expecte
d.png'))) | 45 test_port.layout_tests_dir(), 'platform/mac/another/test-expecte
d.png'))) |
46 self.assertTrue( | 46 self.assertTrue( |
47 self.tool.filesystem.exists(self.tool.filesystem.join( | 47 self.tool.filesystem.exists(self.tool.filesystem.join( |
48 test_port.layout_tests_dir(), 'another/test-expected.txt'))) | 48 test_port.layout_tests_dir(), 'another/test-expected.txt'))) |
49 self.assertTrue( | 49 self.assertTrue( |
50 self.tool.filesystem.exists(self.tool.filesystem.join( | 50 self.tool.filesystem.exists(self.tool.filesystem.join( |
51 test_port.layout_tests_dir(), 'another/test-expected.png'))) | 51 test_port.layout_tests_dir(), 'another/test-expected.png'))) |
OLD | NEW |