[chromeos] Make testProfilePreservedBetweenLogins test robust

It often takes a while for chromeos to successfully open a URL and
register it to history. Retry.

BUG=None
TEST=None

R=craigdh@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10829367

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152010 0039d316-1c4b-4281-b951-d872f2087c98
parent 1abfeea0
...@@ -207,6 +207,9 @@ class ChromeosLogin(pyauto.PyUITest): ...@@ -207,6 +207,9 @@ class ChromeosLogin(pyauto.PyUITest):
# Build up some history and setup state in "Local State". # Build up some history and setup state in "Local State".
url = self.GetHttpURLForDataPath('title2.html') url = self.GetHttpURLForDataPath('title2.html')
self.NavigateToURL(url) self.NavigateToURL(url)
# chromeos often takes a while to register URLs into history.
self.assertTrue(self.WaitUntil(lambda: self.GetHistoryInfo().History()),
msg='Could not open %s successfully' % url)
open('/home/chronos/__magic__', 'w').close() open('/home/chronos/__magic__', 'w').close()
open('/home/chronos/user/__magic__', 'w').close() open('/home/chronos/user/__magic__', 'w').close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment