diff options
author | ace@chromium.org <ace@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-13 00:28:50 +0000 |
---|---|---|
committer | ace@chromium.org <ace@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-13 00:28:50 +0000 |
commit | d842dab5a7762823eea2d6c1ab1dffec4ca92129 (patch) | |
tree | ae947b1dfb6b87d4e727ba1c04b8a93a1a67ff9d /chrome/test/pyautolib | |
parent | 3ed09692223bd8a223379769f23adf1fbb56a4b2 (diff) | |
download | chromium_src-d842dab5a7762823eea2d6c1ab1dffec4ca92129.zip chromium_src-d842dab5a7762823eea2d6c1ab1dffec4ca92129.tar.gz chromium_src-d842dab5a7762823eea2d6c1ab1dffec4ca92129.tar.bz2 |
Workaround for some pyauto test flakiness on linux. Tests that use the omnibox
immediately after creating a new window need to wait for it to be "ready" on
linux.
**remake of issue4838001 (nuked client, long story)
BUG=62783,44203
Review URL: http://codereview.chromium.org/4931001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/pyautolib')
-rw-r--r-- | chrome/test/pyautolib/pyauto.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py index dee070a..8545f65 100644 --- a/chrome/test/pyautolib/pyauto.py +++ b/chrome/test/pyautolib/pyauto.py @@ -438,6 +438,22 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase): } self._GetResultFromJSONRequest(cmd_dict, windex=windex) + # TODO(ace): Remove this hack, update bug 62783. + def WaitUntilOmniboxReadyHack(self, windex=0): + """Wait until the omnibox is ready for input. + + This is a hack workaround for linux platform, which returns from + synchronous window creation methods before the omnibox is fully functional. + + No-op on non-linux platforms. + + Args: + windex: the index of the browser to work on. + """ + if self.IsLinux(): + return self.WaitUntil( + lambda : self.GetOmniboxInfo(windex).Properties('has_focus')) + def WaitUntilOmniboxQueryDone(self, windex=0): """Wait until omnibox has finished populating results. |