summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 22:35:56 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 22:35:56 +0000
commit81698574f45419e2f1dd4735b94842509085b57c (patch)
treed63db92ad1d6c25b291baaa6938605f7a52448de
parent9253d98cf9c35dfea29c2663dfbd51f0a7462175 (diff)
downloadchromium_src-81698574f45419e2f1dd4735b94842509085b57c.zip
chromium_src-81698574f45419e2f1dd4735b94842509085b57c.tar.gz
chromium_src-81698574f45419e2f1dd4735b94842509085b57c.tar.bz2
Fix testProcessCountCombination on Mac
Exclude GPU processes from the counts since they can pop-in any time. BUG=None TEST=testProcessCountCombination R=dennisjeffrey@chromium.org Review URL: http://codereview.chromium.org/8759003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112315 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xchrome/test/functional/process_count.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/chrome/test/functional/process_count.py b/chrome/test/functional/process_count.py
index 32ebf74..f74e9f5 100755
--- a/chrome/test/functional/process_count.py
+++ b/chrome/test/functional/process_count.py
@@ -64,16 +64,17 @@ 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
- # Utility processes may show up any time. Ignore them.
+ # Utility & GPU processes may show up any time. Ignore them.
processes = [x for x in browser_info[0]['processes']
- if x['child_process_type'] != 'Utility']
+ if x['child_process_type'] not in ('Utility', 'GPU')]
num_actual = len(processes)
self.assertEqual(num_actual, num_expected,
- msg='Number of processes (ignoring Utility processes) '
+ msg='Number of processes (ignoring Utility/GPU processes) '
'should be %d, but was %d.\n'
- 'Actual process info:\n%s' % (
- num_expected, num_actual, self.pformat(proc_info)))
+ 'Actual processes:\n%s' % (
+ num_expected, num_actual,
+ [x['child_process_type'] for x in processes]))
def testProcessCountFreshProfile(self):
"""Verifies the process count in a fresh profile."""
@@ -93,11 +94,7 @@ 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)
- 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)
+ self._VerifyProcessCount(self.proc_count_fresh_profile + 1)
def testProcessCountExtensionProcess(self):
"""Verifies the process count when an extension is installed."""
@@ -134,11 +131,7 @@ class ProcessCountTest(pyauto.PyUITest):
for _ in xrange(3):
self.AppendTab(pyauto.GURL('about:blank'), 1)
- 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)
+ self._VerifyProcessCount(self.proc_count_fresh_profile + 8)
if __name__ == '__main__':