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

Unified Diff: chrome/test/mini_installer/launch_chrome.py

Issue 24126005: Use CreateProcess instead of subprocess.Popen to launch Chrome in the mini_installer test framework. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use taskkill. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/mini_installer/launch_chrome.py
diff --git a/chrome/test/mini_installer/launch_chrome.py b/chrome/test/mini_installer/launch_chrome.py
index 311a06b37aa7021afe8431c2c5fa519793a055c6..b85c555a1c8662db4c41c941d4f6df17da9c4c03 100644
--- a/chrome/test/mini_installer/launch_chrome.py
+++ b/chrome/test/mini_installer/launch_chrome.py
@@ -8,9 +8,9 @@ This script launches Chrome and waits until its window shows up.
"""
import optparse
-import subprocess
import sys
import time
+import win32process
import chrome_helper
@@ -42,8 +42,10 @@ def main():
parser.error('Incorrect number of arguments.')
chrome_path = args[0]
- process = subprocess.Popen(chrome_path)
- if not WaitForWindow(process.pid, 'Chrome_WidgetWin_'):
+ _, _, process_id, _ = win32process.CreateProcess(None, chrome_path, None,
+ None, 0, 0, None, None,
+ win32process.STARTUPINFO())
+ if not WaitForWindow(process_id, 'Chrome_WidgetWin_'):
raise Exception('Could not launch Chrome.')
return 0
« no previous file with comments | « no previous file | chrome/test/mini_installer/test_installer.py » ('j') | chrome/test/mini_installer/test_installer.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698