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

Unified Diff: chrome/test/functional/doc_viewing.py

Issue 10836303: [chromeos] Make the doc viewing test more robust (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/doc_viewing.py
diff --git a/chrome/test/functional/doc_viewing.py b/chrome/test/functional/doc_viewing.py
index 0a0821d128c288a7fdb194638b07d80ca408898d..4e21178ea5e2bdc7f502f9cdd0aeafdd79253915 100755
--- a/chrome/test/functional/doc_viewing.py
+++ b/chrome/test/functional/doc_viewing.py
@@ -52,7 +52,15 @@ class DocViewingTest(pyauto.PyUITest):
fname))
file_browser = self._GetFullPageFileBrowser()
self.assertTrue(file_browser, msg='File browser failed to initialize.')
- self.assertTrue(file_browser.Select(fname),
+
+ def _SelectFile():
+ try:
+ file_browser.Select(fname)
+ return True
+ except AssertionError:
+ return False
+
+ self.assertTrue(self.WaitUntil(_SelectFile),
msg='"%s" does not exist.' % fname)
file_browser.ExecuteDefaultTask()
self.assertTrue(self.WaitUntil(self.GetActiveTabTitle,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698