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

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

Issue 5755003: Fix pyauto flakiness by waiting for notification that the renderer process' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 10 years 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
OLDNEW
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
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
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698