summaryrefslogtreecommitdiffstats
path: root/chrome/test/functional
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 22:23:56 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 22:23:56 +0000
commit53fd6de9b1c8fcbeb7ab47327e4f8b50b641334e (patch)
tree6c350eeeb6d904f454a2bb2b9bf61e8a7464a838 /chrome/test/functional
parent42e94a0aed27f6e707b0a149cc67397b363a55c1 (diff)
downloadchromium_src-53fd6de9b1c8fcbeb7ab47327e4f8b50b641334e.zip
chromium_src-53fd6de9b1c8fcbeb7ab47327e4f8b50b641334e.tar.gz
chromium_src-53fd6de9b1c8fcbeb7ab47327e4f8b50b641334e.tar.bz2
Fix flakiness with pyauto tests that load flash
If you try to load a .swf file immediately after firing up the browser, it ends up getting getting downloaded, instead of being displayed through the flash player, which indicates that the plugin isn't registered yet. Force the plugin to get registered before running tests involving flash. This should fix the flakiness on win pyauto bots for the following tests: flash.FlashTest.testFlashLoadsAfterKill infobars.InfobarTest.testPluginCrashInfobar flash.FlashTest.testCanLoadFlash BUG=94123 TEST=green pyauto win bots R=dennisjeffrey@chromium.org Review URL: https://chromiumcodereview.appspot.com/9254010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rwxr-xr-xchrome/test/functional/flash.py13
-rwxr-xr-xchrome/test/functional/infobars.py13
2 files changed, 12 insertions, 14 deletions
diff --git a/chrome/test/functional/flash.py b/chrome/test/functional/flash.py
index 7923455..c43d9fb 100755
--- a/chrome/test/functional/flash.py
+++ b/chrome/test/functional/flash.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -19,6 +19,11 @@ class FlashTest(pyauto.PyUITest):
if (self.IsChromeOS() and
self.GetBrowserInfo()['properties']['branding'] == 'Google Chrome'):
self._flash_plugin_type = 'Pepper Plugin'
+ # Forcibly trigger all plugins to get registered. crbug.com/94123
+ # Sometimes flash files loaded too quickly after firing browser
+ # ends up getting downloaded, which seems to indicate that the plugin
+ # hasn't been registered yet.
+ self.GetPluginsInfo()
def _AssertFlashProcessPresent(self):
child_processes = self.GetBrowserInfo()['child_processes']
@@ -103,12 +108,6 @@ class FlashTest(pyauto.PyUITest):
def testFlashIncognitoMode(self):
"""Verify we can play flash on an incognito window."""
- if self.IsWin() or self.IsMac():
- # On Mac 10.5 and XP, flash files loaded too quickly after firing browser
- # ends up getting downloaded, which seems to indicate that the plugin
- # hasn't been registered yet.
- # Hack to register Flash plugin on Mac 10.5 and XP. crbug.com/94123
- self.GetPluginsInfo()
# Verify no flash process is currently running
self._AssertFlashProcessNotPresent()
flash_url = self.GetFileURLForDataPath('plugin', 'flash.swf')
diff --git a/chrome/test/functional/infobars.py b/chrome/test/functional/infobars.py
index 6ba437c..de50f91 100755
--- a/chrome/test/functional/infobars.py
+++ b/chrome/test/functional/infobars.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -36,6 +36,11 @@ class InfobarTest(pyauto.PyUITest):
if (self.IsChromeOS() and
self.GetBrowserInfo()['properties']['branding'] == 'Google Chrome'):
self._flash_plugin_type = 'Pepper Plugin'
+ # Forcibly trigger all plugins to get registered. crbug.com/94123
+ # Sometimes flash files loaded too quickly after firing browser
+ # ends up getting downloaded, which seems to indicate that the plugin
+ # hasn't been registered yet.
+ self.GetPluginsInfo()
def _GetTabInfo(self, windex=0, tab_index=0):
"""Helper to return info for the given tab in the given window.
@@ -144,12 +149,6 @@ class InfobarTest(pyauto.PyUITest):
def testPluginCrashForMultiTabs(self):
"""Verify plugin crash infobar shows up only on the tabs using plugin."""
- # Flash files loaded too quickly after firing browser end up getting
- # downloaded, which seems to indicate that the plugin hasn't been
- # registered yet.
- # Hack to register Flash plugin on all platforms. crbug.com/94123
- self.GetPluginsInfo()
-
non_flash_url = self.GetFileURLForDataPath('english_page.html')
flash_url = self.GetFileURLForDataPath('plugin', 'FlashSpin.swf')
# False = Non flash url, True = Flash url