diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 15:39:26 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 15:39:26 +0000 |
commit | 1126a1d3fea816b525e9b1e621b2890cf97b2b8a (patch) | |
tree | aa7a8a6831269674c06c9a751527b4d11da2dec4 /chrome/browser/errorpage_uitest.cc | |
parent | fe2b2b36d73c74db993d293538cb1bb6c08379fa (diff) | |
download | chromium_src-1126a1d3fea816b525e9b1e621b2890cf97b2b8a.zip chromium_src-1126a1d3fea816b525e9b1e621b2890cf97b2b8a.tar.gz chromium_src-1126a1d3fea816b525e9b1e621b2890cf97b2b8a.tar.bz2 |
Fix another source of flakiness in ErrorPageTest
We need to wait for correct number of navigations when going back or forward
to the LinkDoctor page.
Re-enable previously disabled tests and remove the now-duplicate browser test.
The test is still not very solid, because the LinkDoctor should be mocked.
TEST=Covered by ui_tests.
http://crbug.com/19361, http://crbug.com/19395
Review URL: http://codereview.chromium.org/174396
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/errorpage_uitest.cc')
-rw-r--r-- | chrome/browser/errorpage_uitest.cc | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/chrome/browser/errorpage_uitest.cc b/chrome/browser/errorpage_uitest.cc index a976f8f..3e34822 100644 --- a/chrome/browser/errorpage_uitest.cc +++ b/chrome/browser/errorpage_uitest.cc @@ -33,13 +33,14 @@ class ErrorPageTest : public UITest { TEST_F(ErrorPageTest, DNSError_Basic) { GURL test_url(URLRequestFailedDnsJob::kTestUrl); + // The first navigation should fail, and the second one should be the error + // page. NavigateToURLBlockUntilNavigationsComplete(test_url, 2); EXPECT_TRUE(WaitForTitleContaining(test_url.host())); } -// Flaky, see http://crbug.com/19361 and http://crbug.com/19395. -TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack1) { +TEST_F(ErrorPageTest, DNSError_GoBack1) { // Test that a DNS error occuring in the main frame does not result in an // additional session history entry. GURL test_url(URLRequestFailedDnsJob::kTestUrl); @@ -53,8 +54,7 @@ TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack1) { EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness")); } -// Flaky, see http://crbug.com/19361 and http://crbug.com/19395. -TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2) { +TEST_F(ErrorPageTest, DNSError_GoBack2) { // Test that a DNS error occuring in the main frame does not result in an // additional session history entry. GURL test_url(URLRequestFailedDnsJob::kTestUrl); @@ -64,15 +64,16 @@ TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2) { EXPECT_TRUE(WaitForTitleContaining(test_url.host())); NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title3.html")); - GetActiveTab()->GoBack(); + // The first navigation should fail, and the second one should be the error + // page. + GetActiveTab()->GoBackBlockUntilNavigationsComplete(2); EXPECT_TRUE(WaitForTitleContaining(test_url.host())); GetActiveTab()->GoBack(); EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness")); } -// Flaky, see http://crbug.com/19361 and http://crbug.com/19395. -TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2AndForward) { +TEST_F(ErrorPageTest, DNSError_GoBack2AndForward) { // Test that a DNS error occuring in the main frame does not result in an // additional session history entry. @@ -83,16 +84,19 @@ TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2AndForward) { EXPECT_TRUE(WaitForTitleContaining(test_url.host())); NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title3.html")); - GetActiveTab()->GoBack(); + // The first navigation should fail, and the second one should be the error + // page. + GetActiveTab()->GoBackBlockUntilNavigationsComplete(2); EXPECT_TRUE(WaitForTitleContaining(test_url.host())); GetActiveTab()->GoBack(); - GetActiveTab()->GoForward(); + // The first navigation should fail, and the second one should be the error + // page. + GetActiveTab()->GoForwardBlockUntilNavigationsComplete(2); EXPECT_TRUE(WaitForTitleContaining(test_url.host())); } -// Flaky, see http://crbug.com/19361 and http://crbug.com/19395. -TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2Forward2) { +TEST_F(ErrorPageTest, DNSError_GoBack2Forward2) { // Test that a DNS error occuring in the main frame does not result in an // additional session history entry. @@ -103,10 +107,14 @@ TEST_F(ErrorPageTest, DISABLED_DNSError_GoBack2Forward2) { EXPECT_TRUE(WaitForTitleContaining(test_url.host())); NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title2.html")); - GetActiveTab()->GoBack(); + // The first navigation should fail, and the second one should be the error + // page. + GetActiveTab()->GoBackBlockUntilNavigationsComplete(2); EXPECT_TRUE(WaitForTitleContaining(test_url.host())); GetActiveTab()->GoBack(); - GetActiveTab()->GoForward(); + // The first navigation should fail, and the second one should be the error + // page. + GetActiveTab()->GoForwardBlockUntilNavigationsComplete(2); EXPECT_TRUE(WaitForTitleContaining(test_url.host())); GetActiveTab()->GoForward(); |