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

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

Issue 8665007: Fix process_count tests on chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 20f8e0275419097965d23ee4ee288491c04dc115..d082d71e9e5261e41a2b8058c211c411065e1f49 100644
--- a/chrome/test/functional/process_count.py
+++ b/chrome/test/functional/process_count.py
@@ -16,7 +16,7 @@ class ProcessCountTest(pyauto.PyUITest):
'win': 2, # Processes: browser, tab.
'mac': 2, # Processes: browser, tab.
'linux': 4, # Processes: browser, tab, sandbox helper, zygote.
- 'chromeos': 5, # Processes: browser, tab, sandbox helper, zygote, GPU.
+ 'chromeos': 4, # Processes: browser, tab, sandbox helper, zygote.
}
CHROME_PROCESS_NAME = {
@@ -64,10 +64,14 @@ class ProcessCountTest(pyauto.PyUITest):
browser_info = [x for x in proc_info['browsers']
if x['process_name'] == self.chrome_proc_name]
assert len(browser_info) == 1
- num_actual = len(browser_info[0]['processes'])
+ # Utility processes may show up any time. Ignore them.
+ processes = [x for x in browser_info[0]['processes']
+ if x['child_process_type'] != 'Utility']
+ num_actual = len(processes)
self.assertEqual(num_actual, num_expected,
- msg='Number of processes should be %d, but was %d.\n'
+ msg='Number of processes (ignoring Utility processes) '
+ 'should be %d, but was %d.\n'
'Actual process info:\n%s' % (
num_expected, num_actual, self.pformat(proc_info)))
@@ -89,7 +93,11 @@ class ProcessCountTest(pyauto.PyUITest):
"""Verifies the process count when the flash process is running."""
flash_url = self.GetFileURLForDataPath('plugin', 'flash.swf')
self.NavigateToURL(flash_url)
- self._VerifyProcessCount(self.proc_count_fresh_profile + 1)
+ if self.IsChromeOS():
+ # Flash triggers an extra GPU process on ChromeOS.
+ self._VerifyProcessCount(self.proc_count_fresh_profile + 2)
+ else:
+ self._VerifyProcessCount(self.proc_count_fresh_profile + 1)
def testProcessCountExtensionProcess(self):
"""Verifies the process count when an extension is installed."""
@@ -128,7 +136,11 @@ class ProcessCountTest(pyauto.PyUITest):
for _ in xrange(3):
self.AppendTab(pyauto.GURL('about:blank'), 1)
- self._VerifyProcessCount(self.proc_count_fresh_profile + 8)
+ if self.IsChromeOS():
+ # Flash triggers an extra GPU process on ChromeOS.
+ self._VerifyProcessCount(self.proc_count_fresh_profile + 9)
+ else:
+ self._VerifyProcessCount(self.proc_count_fresh_profile + 8)
if __name__ == '__main__':
« 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