Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/command_test.py

Issue 2127343003: Rename MockTool -> MockWebKitPatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2009 Google Inc. All rights reserved. 1 # Copyright (C) 2009 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 11 matching lines...) Expand all
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
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 30
31 from webkitpy.common.system.outputcapture import OutputCapture 31 from webkitpy.common.system.outputcapture import OutputCapture
32 from webkitpy.tool.mock_tool import MockOptions, MockTool 32 from webkitpy.tool.mock_tool import MockOptions, MockWebKitPatch
33 33
34 34
35 class CommandsTest(unittest.TestCase): 35 class CommandsTest(unittest.TestCase):
36 36
37 def assert_execute_outputs(self, command, args=None, expected_stdout="", exp ected_stderr="", 37 def assert_execute_outputs(self, command, args=None, expected_stdout="", exp ected_stderr="",
38 expected_exception=None, expected_logs=None, opti ons=MockOptions(), tool=MockTool()): 38 expected_exception=None, expected_logs=None, opti ons=MockOptions(), tool=MockWebKitPatch()):
39 args = args or [] 39 args = args or []
40 options.blocks = None 40 options.blocks = None
41 options.cc = 'MOCK cc' 41 options.cc = 'MOCK cc'
42 options.component = 'MOCK component' 42 options.component = 'MOCK component'
43 options.confirm = True 43 options.confirm = True
44 options.email = 'MOCK email' 44 options.email = 'MOCK email'
45 options.git_commit = 'MOCK git commit' 45 options.git_commit = 'MOCK git commit'
46 options.obsolete_patches = True 46 options.obsolete_patches = True
47 options.open_bug = True 47 options.open_bug = True
48 options.port = 'MOCK port' 48 options.port = 'MOCK port'
49 options.update_changelogs = False 49 options.update_changelogs = False
50 options.quiet = True 50 options.quiet = True
51 options.reviewer = 'MOCK reviewer' 51 options.reviewer = 'MOCK reviewer'
52 command.bind_to_tool(tool) 52 command.bind_to_tool(tool)
53 OutputCapture().assert_outputs(self, command.execute, [options, args, to ol], expected_stdout=expected_stdout, 53 OutputCapture().assert_outputs(self, command.execute, [options, args, to ol], expected_stdout=expected_stdout,
54 expected_stderr=expected_stderr, expected _exception=expected_exception, expected_logs=expected_logs) 54 expected_stderr=expected_stderr, expected _exception=expected_exception, expected_logs=expected_logs)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698