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

Unified Diff: chrome/test/functional/process_count.py

Issue 9553010: Pyauto process count tests now get browser executable name via an automation hook. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/process_count.py
diff --git a/chrome/test/functional/process_count.py b/chrome/test/functional/process_count.py
index 42fcb587f72e3fb53c68c3e566be50467a89ed74..d47538cd5ad615485afbed26e9a9b09fffec76d1 100755
--- a/chrome/test/functional/process_count.py
+++ b/chrome/test/functional/process_count.py
@@ -19,13 +19,6 @@ class ProcessCountTest(pyauto.PyUITest):
'chromeos': 4, # Processes: browser, tab, sandbox helper, zygote.
}
- CHROME_PROCESS_NAME = {
- 'win': 'chrome.exe',
- 'mac': 'Chromium',
- 'linux': 'chrome',
- 'chromeos': 'chrome',
- }
-
def Debug(self):
"""Test method for experimentation.
@@ -37,19 +30,14 @@ class ProcessCountTest(pyauto.PyUITest):
def setUp(self):
self.proc_count_fresh_profile = 0
- self.chrome_proc_name = ''
if self.IsChromeOS():
self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['chromeos']
- self.chrome_proc_name = self.CHROME_PROCESS_NAME['chromeos']
elif self.IsWin():
self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['win']
- self.chrome_proc_name = self.CHROME_PROCESS_NAME['win']
elif self.IsMac():
self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['mac']
- self.chrome_proc_name = self.CHROME_PROCESS_NAME['mac']
elif self.IsLinux():
self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['linux']
- self.chrome_proc_name = self.CHROME_PROCESS_NAME['linux']
pyauto.PyUITest.setUp(self)
@@ -62,9 +50,11 @@ class ProcessCountTest(pyauto.PyUITest):
num_expected: An integer representing the expected number of Chrome-
related processes that should currently exist.
"""
+ browser_process_name = (
+ self.GetBrowserInfo()['properties']['BrowserProcessExecutableName'])
proc_info = self.GetProcessInfo()
browser_info = [x for x in proc_info['browsers']
- if x['process_name'] == self.chrome_proc_name]
+ if x['process_name'] == browser_process_name]
assert len(browser_info) == 1
# Utility & GPU processes may show up any time. Ignore them.
processes = [x for x in browser_info[0]['processes']
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698