OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 18 matching lines...) Expand all Loading... |
29 import unittest | 29 import unittest |
30 | 30 |
31 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer | 31 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer |
32 from webkitpy.common.checkout.scm.scm_mock import MockSCM | 32 from webkitpy.common.checkout.scm.scm_mock import MockSCM |
33 from webkitpy.common.host_mock import MockHost | 33 from webkitpy.common.host_mock import MockHost |
34 from webkitpy.common.net.buildbot.buildbot_mock import MockBuilder | 34 from webkitpy.common.net.buildbot.buildbot_mock import MockBuilder |
35 from webkitpy.common.net.layouttestresults import LayoutTestResults | 35 from webkitpy.common.net.layouttestresults import LayoutTestResults |
36 from webkitpy.common.system.executive_mock import MockExecutive | 36 from webkitpy.common.system.executive_mock import MockExecutive |
37 from webkitpy.common.system.executive_mock import MockExecutive2 | 37 from webkitpy.common.system.executive_mock import MockExecutive2 |
38 from webkitpy.common.system.outputcapture import OutputCapture | 38 from webkitpy.common.system.outputcapture import OutputCapture |
39 from webkitpy.thirdparty.mock import Mock | |
40 from webkitpy.tool.commands.rebaseline import * | 39 from webkitpy.tool.commands.rebaseline import * |
41 from webkitpy.tool.mocktool import MockTool, MockOptions | 40 from webkitpy.tool.mocktool import MockTool, MockOptions |
42 | 41 |
43 | 42 |
44 class _BaseTestCase(unittest.TestCase): | 43 class _BaseTestCase(unittest.TestCase): |
45 MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True' | 44 MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True' |
46 WEB_PREFIX = 'http://example.com/f/builders/WebKit Mac10.7/results/layout-te
st-results' | 45 WEB_PREFIX = 'http://example.com/f/builders/WebKit Mac10.7/results/layout-te
st-results' |
47 | 46 |
48 command_constructor = None | 47 command_constructor = None |
49 | 48 |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 oc.capture_output() | 1235 oc.capture_output() |
1237 self.command._do_one_rebaseline() | 1236 self.command._do_one_rebaseline() |
1238 out, _, _ = oc.restore_output() | 1237 out, _, _ = oc.restore_output() |
1239 | 1238 |
1240 self.assertEqual(out, 'MOCK STDOUT\n') | 1239 self.assertEqual(out, 'MOCK STDOUT\n') |
1241 self.assertEqual(self.tool.executive.calls, [ | 1240 self.assertEqual(self.tool.executive.calls, [ |
1242 ['git', 'pull'], | 1241 ['git', 'pull'], |
1243 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], | 1242 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], |
1244 ]) | 1243 ]) |
1245 self.assertEqual(self._logs, ['MOCK STDOUT']) | 1244 self.assertEqual(self._logs, ['MOCK STDOUT']) |
OLD | NEW |