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

Side by Side Diff: chrome/test/functional/process_count.py

Issue 9570025: Fix pyauto process_test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 7
8 import pyauto_functional 8 import pyauto_functional
9 import pyauto 9 import pyauto
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 self.chrome_proc_name = self.CHROME_PROCESS_NAME['win'] 46 self.chrome_proc_name = self.CHROME_PROCESS_NAME['win']
47 elif self.IsMac(): 47 elif self.IsMac():
48 self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['mac'] 48 self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['mac']
49 self.chrome_proc_name = self.CHROME_PROCESS_NAME['mac'] 49 self.chrome_proc_name = self.CHROME_PROCESS_NAME['mac']
50 elif self.IsLinux(): 50 elif self.IsLinux():
51 self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['linux'] 51 self.proc_count_fresh_profile = self.FRESH_PROFILE_PROC_COUNT['linux']
52 self.chrome_proc_name = self.CHROME_PROCESS_NAME['linux'] 52 self.chrome_proc_name = self.CHROME_PROCESS_NAME['linux']
53 53
54 pyauto.PyUITest.setUp(self) 54 pyauto.PyUITest.setUp(self)
55 55
56 self.NavigateToURL('about:blank')
57
56 def _VerifyProcessCount(self, num_expected): 58 def _VerifyProcessCount(self, num_expected):
57 """Verifies the number of Chrome-related processes is as expected. 59 """Verifies the number of Chrome-related processes is as expected.
58 60
59 Args: 61 Args:
60 num_expected: An integer representing the expected number of Chrome- 62 num_expected: An integer representing the expected number of Chrome-
61 related processes that should currently exist. 63 related processes that should currently exist.
62 """ 64 """
63 proc_info = self.GetProcessInfo() 65 proc_info = self.GetProcessInfo()
64 browser_info = [x for x in proc_info['browsers'] 66 browser_info = [x for x in proc_info['browsers']
65 if x['process_name'] == self.chrome_proc_name] 67 if x['process_name'] == self.chrome_proc_name]
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 self.OpenNewBrowserWindow(True) 131 self.OpenNewBrowserWindow(True)
130 132
131 for _ in xrange(3): 133 for _ in xrange(3):
132 self.AppendTab(pyauto.GURL('about:blank'), 1) 134 self.AppendTab(pyauto.GURL('about:blank'), 1)
133 135
134 self._VerifyProcessCount(self.proc_count_fresh_profile + 8) 136 self._VerifyProcessCount(self.proc_count_fresh_profile + 8)
135 137
136 138
137 if __name__ == '__main__': 139 if __name__ == '__main__':
138 pyauto_functional.Main() 140 pyauto_functional.Main()
OLDNEW
« 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