| 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 14 matching lines...) Expand all Loading... |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 import unittest | 29 import unittest |
| 30 import webkitpy.tool.commands.rebaseline | 30 import webkitpy.tool.commands.rebaseline |
| 31 | 31 |
| 32 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer | 32 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer |
| 33 from webkitpy.common.checkout.scm.scm_mock import MockSCM | 33 from webkitpy.common.checkout.scm.scm_mock import MockSCM |
| 34 from webkitpy.common.host_mock import MockHost | 34 from webkitpy.common.host_mock import MockHost |
| 35 from webkitpy.common.net.buildbot.buildbot_mock import MockBuilder | 35 from webkitpy.common.net.buildbot_mock import MockBuilder |
| 36 from webkitpy.common.net.layouttestresults import LayoutTestResults | 36 from webkitpy.common.net.layouttestresults import LayoutTestResults |
| 37 from webkitpy.common.system.executive_mock import MockExecutive | 37 from webkitpy.common.system.executive_mock import MockExecutive |
| 38 from webkitpy.common.system.executive_mock import MockExecutive2 | 38 from webkitpy.common.system.executive_mock import MockExecutive2 |
| 39 from webkitpy.common.system.outputcapture import OutputCapture | 39 from webkitpy.common.system.outputcapture import OutputCapture |
| 40 from webkitpy.tool.commands.rebaseline import * | 40 from webkitpy.tool.commands.rebaseline import * |
| 41 from webkitpy.tool.mocktool import MockTool, MockOptions | 41 from webkitpy.tool.mocktool import MockTool, MockOptions |
| 42 | 42 |
| 43 | 43 |
| 44 class _BaseTestCase(unittest.TestCase): | 44 class _BaseTestCase(unittest.TestCase): |
| 45 MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True' | 45 MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True' |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 oc.capture_output() | 1547 oc.capture_output() |
| 1548 self.command._do_one_rebaseline() | 1548 self.command._do_one_rebaseline() |
| 1549 out, _, _ = oc.restore_output() | 1549 out, _, _ = oc.restore_output() |
| 1550 | 1550 |
| 1551 self.assertEqual(out, 'MOCK STDOUT\n') | 1551 self.assertEqual(out, 'MOCK STDOUT\n') |
| 1552 self.assertEqual(self.tool.executive.calls, [ | 1552 self.assertEqual(self.tool.executive.calls, [ |
| 1553 ['git', 'pull'], | 1553 ['git', 'pull'], |
| 1554 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], | 1554 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], |
| 1555 ]) | 1555 ]) |
| 1556 self.assertEqual(self._logs, ['MOCK STDOUT']) | 1556 self.assertEqual(self._logs, ['MOCK STDOUT']) |
| OLD | NEW |