OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 | 6 |
7 """ | 7 """ |
8 Stess Tests for Google Chrome. | 8 Stess Tests for Google Chrome. |
9 | 9 |
10 This script runs 4 different stress tests: | 10 This script runs 4 different stress tests: |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 self._ReloadAllTabs() | 228 self._ReloadAllTabs() |
229 self._CloseAllTabs() | 229 self._CloseAllTabs() |
230 | 230 |
231 def _KillAndReloadRenderersWithFlash(self): | 231 def _KillAndReloadRenderersWithFlash(self): |
232 """Stress test by killing renderer processes and reloading tabs.""" | 232 """Stress test by killing renderer processes and reloading tabs.""" |
233 logging.info('In _KillAndReloadRenderersWithFlash') | 233 logging.info('In _KillAndReloadRenderersWithFlash') |
234 self._LoadFlashInMultipleTabs() | 234 self._LoadFlashInMultipleTabs() |
235 info = self.GetBrowserInfo() | 235 info = self.GetBrowserInfo() |
236 # Kill all renderer processes | 236 # Kill all renderer processes |
237 for tab_index in range(self.GetTabCount(0)): | 237 for tab_index in range(self.GetTabCount(0)): |
238 self.Kill(info['windows'][0]['tabs'][tab_index]['renderer_pid']) | 238 self.KillRendererProcess( |
| 239 info['windows'][0]['tabs'][tab_index]['renderer_pid']) |
239 self._ReloadAllTabs() | 240 self._ReloadAllTabs() |
240 self._CloseAllTabs() | 241 self._CloseAllTabs() |
241 | 242 |
242 def _TogglePlugin(self, plugin_name): | 243 def _TogglePlugin(self, plugin_name): |
243 """Toggle plugin status. | 244 """Toggle plugin status. |
244 | 245 |
245 Args: | 246 Args: |
246 plugin_name: Name of the plugin to toggle. | 247 plugin_name: Name of the plugin to toggle. |
247 """ | 248 """ |
248 plugins = self.GetPluginsInfo().Plugins() | 249 plugins = self.GetPluginsInfo().Plugins() |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 | 799 |
799 if self.IsMac(): | 800 if self.IsMac(): |
800 zombie = 'ps -el | grep Chrom | grep -v grep | grep Z | wc -l' | 801 zombie = 'ps -el | grep Chrom | grep -v grep | grep Z | wc -l' |
801 zombie_count = int(commands.getoutput(zombie)) | 802 zombie_count = int(commands.getoutput(zombie)) |
802 if zombie_count > 0: | 803 if zombie_count > 0: |
803 logging.info('WE HAVE ZOMBIES = %d' % zombie_count) | 804 logging.info('WE HAVE ZOMBIES = %d' % zombie_count) |
804 | 805 |
805 | 806 |
806 if __name__ == '__main__': | 807 if __name__ == '__main__': |
807 pyauto_functional.Main() | 808 pyauto_functional.Main() |
OLD | NEW |