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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py

Issue 1846093002: Revert of Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2009 Daniel Bates (dbates@intudata.com). All rights reserved. 2 # Copyright (C) 2009 Daniel Bates (dbates@intudata.com). All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 import os 30 import os
31 import errno
32 import signal
31 import subprocess 33 import subprocess
32 import sys 34 import sys
35 import time
33 import unittest 36 import unittest
34 37
35 # Since we execute this script directly as part of the unit tests, we need to en sure 38 # Since we execute this script directly as part of the unit tests, we need to en sure
36 # that Tools/Scripts is in sys.path for the next imports to work correctly. 39 # that Tools/Scripts is in sys.path for the next imports to work correctly.
37 script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os. path.abspath(__file__))))) 40 script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os. path.abspath(__file__)))))
38 if script_dir not in sys.path: 41 if script_dir not in sys.path:
39 sys.path.append(script_dir) 42 sys.path.append(script_dir)
40 43
41 44
42 from webkitpy.common.system.executive import Executive, ScriptError 45 from webkitpy.common.system.executive import Executive, ScriptError
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 import msvcrt 194 import msvcrt
192 msvcrt.setmode(stdout.fileno(), os.O_BINARY) 195 msvcrt.setmode(stdout.fileno(), os.O_BINARY)
193 if cmd == '--cat': 196 if cmd == '--cat':
194 stdout.write(stdin.read()) 197 stdout.write(stdin.read())
195 elif cmd == '--echo': 198 elif cmd == '--echo':
196 stdout.write(' '.join(args)) 199 stdout.write(' '.join(args))
197 return 0 200 return 0
198 201
199 if __name__ == '__main__' and len(sys.argv) > 1 and sys.argv[1] in ('--cat', '-- echo'): 202 if __name__ == '__main__' and len(sys.argv) > 1 and sys.argv[1] in ('--cat', '-- echo'):
200 sys.exit(main(sys.platform, sys.stdin, sys.stdout, sys.argv[1], sys.argv[2:] )) 203 sys.exit(main(sys.platform, sys.stdin, sys.stdout, sys.argv[1], sys.argv[2:] ))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698