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

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

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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 16 matching lines...) Expand all
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.mocktool import MockOptions, MockTool 32 from webkitpy.tool.mocktool import MockOptions, MockTool
33 33
34 34
35 class CommandsTest(unittest.TestCase): 35 class CommandsTest(unittest.TestCase):
36 36
37 def assert_execute_outputs(self, command, args=[], expected_stdout="", expec ted_stderr="", expected_exception=None, expected_logs=None, options=MockOptions( ), tool=MockTool()): 37 def assert_execute_outputs(self, command, args=[], expected_stdout="", expec ted_stderr="",
38 expected_exception=None, expected_logs=None, opti ons=MockOptions(), tool=MockTool()):
38 options.blocks = None 39 options.blocks = None
39 options.cc = 'MOCK cc' 40 options.cc = 'MOCK cc'
40 options.component = 'MOCK component' 41 options.component = 'MOCK component'
41 options.confirm = True 42 options.confirm = True
42 options.email = 'MOCK email' 43 options.email = 'MOCK email'
43 options.git_commit = 'MOCK git commit' 44 options.git_commit = 'MOCK git commit'
44 options.obsolete_patches = True 45 options.obsolete_patches = True
45 options.open_bug = True 46 options.open_bug = True
46 options.port = 'MOCK port' 47 options.port = 'MOCK port'
47 options.update_changelogs = False 48 options.update_changelogs = False
48 options.quiet = True 49 options.quiet = True
49 options.reviewer = 'MOCK reviewer' 50 options.reviewer = 'MOCK reviewer'
50 command.bind_to_tool(tool) 51 command.bind_to_tool(tool)
51 OutputCapture().assert_outputs(self, command.execute, [options, args, to ol], expected_stdout=expected_stdout, 52 OutputCapture().assert_outputs(self, command.execute, [options, args, to ol], expected_stdout=expected_stdout,
52 expected_stderr=expected_stderr, expected _exception=expected_exception, expected_logs=expected_logs) 53 expected_stderr=expected_stderr, expected _exception=expected_exception, expected_logs=expected_logs)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698