summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 08:33:39 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 08:33:39 +0000
commit988c411a15dde580e86f4f872164b9192d92e8a5 (patch)
treeb64a19ae9899ed11a2e9fd02de717ccb9c857eb6 /tools
parent50069d40dc7854c9010abc293fd803946e818428 (diff)
downloadchromium_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.py2
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)