diff options
author | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-02 08:33:39 +0000 |
---|---|---|
committer | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-02 08:33:39 +0000 |
commit | 988c411a15dde580e86f4f872164b9192d92e8a5 (patch) | |
tree | b64a19ae9899ed11a2e9fd02de717ccb9c857eb6 /tools | |
parent | 50069d40dc7854c9010abc293fd803946e818428 (diff) | |
download | chromium_src-988c411a15dde580e86f4f872164b9192d92e8a5.zip chromium_src-988c411a15dde580e86f4f872164b9192d92e8a5.tar.gz chromium_src-988c411a15dde580e86f4f872164b9192d92e8a5.tar.bz2 |
[Telemetry] Speculative fix for testActivateTab flake.
If I open a new tab in Chrome (without Telemetry) and print `document.hidden`
during the window.load event, I get true. Not sure if that is correct per
spec, but certainly explains why this test was flaky after only waiting for
DOMContentLoaded.
Now we wait for the condition to be true and will time out after 5s if it
breaks.
BUG=357691
Review URL: https://codereview.chromium.org/221703002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r-- | tools/telemetry/telemetry/core/tab_unittest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/telemetry/telemetry/core/tab_unittest.py b/tools/telemetry/telemetry/core/tab_unittest.py index ede2520..1a9a5ec 100644 --- a/tools/telemetry/telemetry/core/tab_unittest.py +++ b/tools/telemetry/telemetry/core/tab_unittest.py @@ -57,7 +57,7 @@ class TabTest(tab_test_case.TabTestCase): logging.warning('Browser does not support tab control, skipping test.') return - self.assertTrue(_IsDocumentVisible(self._tab)) + util.WaitFor(lambda: _IsDocumentVisible(self._tab), timeout=5) new_tab = self._browser.tabs.New() new_tab.Navigate('about:blank') util.WaitFor(lambda: _IsDocumentVisible(new_tab), timeout=5) |