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

Side by Side Diff: chrome/test/webdriver/test/util.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 3 # found in the LICENSE file.
5 4
6 """Generic utilities for all python scripts.""" 5 """Generic utilities for all python scripts."""
7 6
8 import os 7 import os
9 import signal 8 import signal
10 import subprocess 9 import subprocess
11 import sys 10 import sys
(...skipping 27 matching lines...) Expand all
39 def IsMac(): 38 def IsMac():
40 return sys.platform.startswith('darwin') 39 return sys.platform.startswith('darwin')
41 40
42 41
43 def Kill(pid): 42 def Kill(pid):
44 """Terminate the given pid.""" 43 """Terminate the given pid."""
45 if IsWin(): 44 if IsWin():
46 subprocess.call(['taskkill.exe', '/T', '/F', '/PID', str(pid)]) 45 subprocess.call(['taskkill.exe', '/T', '/F', '/PID', str(pid)])
47 else: 46 else:
48 os.kill(pid, signal.SIGTERM) 47 os.kill(pid, signal.SIGTERM)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698