| 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 12 matching lines...) Expand all Loading... |
| 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 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 | |
| 34 from webkitpy.common.host_mock import MockHost | |
| 35 from webkitpy.common.net.buildbot.buildbot_mock import MockBuilder | 33 from webkitpy.common.net.buildbot.buildbot_mock import MockBuilder |
| 36 from webkitpy.common.net.layouttestresults import LayoutTestResults | 34 from webkitpy.common.net.layouttestresults import LayoutTestResults |
| 37 from webkitpy.common.system.executive_mock import MockExecutive | 35 from webkitpy.common.system.executive_mock import MockExecutive |
| 38 from webkitpy.common.system.executive_mock import MockExecutive2 | 36 from webkitpy.common.system.executive_mock import MockExecutive2 |
| 39 from webkitpy.common.system.outputcapture import OutputCapture | 37 from webkitpy.common.system.outputcapture import OutputCapture |
| 40 from webkitpy.tool.commands.rebaseline import * | 38 from webkitpy.tool.commands.rebaseline import * |
| 41 from webkitpy.tool.mocktool import MockTool, MockOptions | 39 from webkitpy.tool.mocktool import MockTool, MockOptions |
| 42 | 40 |
| 43 | 41 |
| 44 class _BaseTestCase(unittest.TestCase): | 42 class _BaseTestCase(unittest.TestCase): |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 oc.capture_output() | 1466 oc.capture_output() |
| 1469 self.command._do_one_rebaseline() | 1467 self.command._do_one_rebaseline() |
| 1470 out, _, _ = oc.restore_output() | 1468 out, _, _ = oc.restore_output() |
| 1471 | 1469 |
| 1472 self.assertEqual(out, 'MOCK STDOUT\n') | 1470 self.assertEqual(out, 'MOCK STDOUT\n') |
| 1473 self.assertEqual(self.tool.executive.calls, [ | 1471 self.assertEqual(self.tool.executive.calls, [ |
| 1474 ['git', 'pull'], | 1472 ['git', 'pull'], |
| 1475 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], | 1473 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au
to-rebaseline', '--verbose'], |
| 1476 ]) | 1474 ]) |
| 1477 self.assertEqual(self._logs, ['MOCK STDOUT']) | 1475 self.assertEqual(self._logs, ['MOCK STDOUT']) |
| OLD | NEW |