diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 09:33:21 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-10 09:33:21 +0000 |
commit | 84466968475088bf0f7ea837a215dec061d5eb41 (patch) | |
tree | 335808d3950114731f4dbc7c1ea8b618d76b581c /chrome/browser/browser_uitest.cc | |
parent | 1eb175082bf16c5f7d92972f5d20277cb665d8e8 (diff) | |
download | chromium_src-84466968475088bf0f7ea837a215dec061d5eb41.zip chromium_src-84466968475088bf0f7ea837a215dec061d5eb41.tar.gz chromium_src-84466968475088bf0f7ea837a215dec061d5eb41.tar.bz2 |
Make several tests more snappy, less sleepy.
Some also say it's good for reducing flakiness.
TEST=Changing ui_tests.
BUG=none
Review URL: http://codereview.chromium.org/593018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index abfecd9..5ceb55f 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -222,20 +222,9 @@ TEST_F(VisibleBrowserTest, WindowOpenClose) { FilePath test_file(test_data_directory_); test_file = test_file.AppendASCII("window.close.html"); - NavigateToURL(net::FilePathToFileURL(test_file)); - - int i; - for (i = 0; i < 10; ++i) { - PlatformThread::Sleep(action_max_timeout_ms() / 10); - std::wstring title = GetActiveTabTitle(); - if (title == L"PASSED") { - // Success, bail out. - break; - } - } - - if (i == 10) - FAIL() << "failed to get error page title"; + NavigateToURLBlockUntilNavigationsComplete( + net::FilePathToFileURL(test_file), 2); + EXPECT_EQ(L"Title Of Awesomeness", GetActiveTabTitle()); } class ShowModalDialogTest : public UITest { |