OLD | NEW |
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 Loading... |
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 Loading... |
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() |
OLD | NEW |