Chromium Code Reviews| 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..9ba85093385845788d477bea317a1cb85097e4d0 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(): |
| + # an extra gpu process |
|
dennis_jeffrey
2011/11/23 00:56:11
nit: # Flash triggers an extra GPU process on Chro
|
| + self._VerifyProcessCount(self.proc_count_fresh_profile + 9) |
| + else: |
| + self._VerifyProcessCount(self.proc_count_fresh_profile + 8) |
| if __name__ == '__main__': |