Fix process_count tests on chromeos

GPU process no longer automatically shows up/after at login.

R=dennisjeffrey@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8665007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111267 0039d316-1c4b-4281-b951-d872f2087c98
parent 45644f6c
......@@ -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__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment