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

Side by Side Diff: chrome/browser/errorpage_uitest.cc

Issue 4251003: Marking ErrorPageTest.IFrame404 as flaky on Windows builders, probably relate... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_util.h" 5 #include "base/string_util.h"
6 #include "chrome/test/automation/tab_proxy.h" 6 #include "chrome/test/automation/tab_proxy.h"
7 #include "chrome/test/ui/ui_test.h" 7 #include "chrome/test/ui/ui_test.h"
8 #include "chrome/browser/net/url_request_failed_dns_job.h" 8 #include "chrome/browser/net/url_request_failed_dns_job.h"
9 #include "chrome/browser/net/url_request_mock_http_job.h" 9 #include "chrome/browser/net/url_request_mock_http_job.h"
10 #include "net/test/test_server.h" 10 #include "net/test/test_server.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 FilePath(FILE_PATH_LITERAL("title2.html")))); 156 FilePath(FILE_PATH_LITERAL("title2.html"))));
157 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl( 157 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(
158 FilePath(FILE_PATH_LITERAL("iframe_dns_error.html")))); 158 FilePath(FILE_PATH_LITERAL("iframe_dns_error.html"))));
159 159
160 EXPECT_TRUE(GetActiveTab()->GoBack()); 160 EXPECT_TRUE(GetActiveTab()->GoBack());
161 EXPECT_TRUE(GetActiveTab()->GoForward()); 161 EXPECT_TRUE(GetActiveTab()->GoForward());
162 162
163 EXPECT_TRUE(WaitForTitleMatching(L"Blah")); 163 EXPECT_TRUE(WaitForTitleMatching(L"Blah"));
164 } 164 }
165 165
166 TEST_F(ErrorPageTest, IFrame404) { 166 #if defined(OS_WIN)
167 // Might be related to http://crbug.com/60937
168 #define MAYBE_IFrame404 FLAKY_IFrame404
169 #else
170 #define MAYBE_IFrame404 IFrame404
171 #endif
172
173 TEST_F(ErrorPageTest, MAYBE_IFrame404) {
167 // iframes that have 404 pages should not trigger an alternate error page. 174 // iframes that have 404 pages should not trigger an alternate error page.
168 // In this test, the iframe sets the title of the parent page to "SUCCESS" 175 // In this test, the iframe sets the title of the parent page to "SUCCESS"
169 // when the iframe loads. If the iframe fails to load (because an alternate 176 // when the iframe loads. If the iframe fails to load (because an alternate
170 // error page loads instead), then the title will remain as "FAIL". 177 // error page loads instead), then the title will remain as "FAIL".
171 net::TestServer test_server(net::TestServer::TYPE_HTTP, 178 net::TestServer test_server(net::TestServer::TYPE_HTTP,
172 FilePath(FILE_PATH_LITERAL("chrome/test/data"))); 179 FilePath(FILE_PATH_LITERAL("chrome/test/data")));
173 ASSERT_TRUE(test_server.Start()); 180 ASSERT_TRUE(test_server.Start());
174 NavigateToURL(test_server.GetURL("files/iframe404.html")); 181 NavigateToURL(test_server.GetURL("files/iframe404.html"));
175 EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS")); 182 EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS"));
176 } 183 }
(...skipping 17 matching lines...) Expand all
194 // page. 201 // page.
195 NavigateToURLBlockUntilNavigationsComplete( 202 NavigateToURLBlockUntilNavigationsComplete(
196 URLRequestMockHTTPJob::GetMockUrl( 203 URLRequestMockHTTPJob::GetMockUrl(
197 FilePath(FILE_PATH_LITERAL("page404.html"))), 2); 204 FilePath(FILE_PATH_LITERAL("page404.html"))), 2);
198 EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor")); 205 EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor"));
199 206
200 EXPECT_TRUE(GetActiveTab()->GoBack()); 207 EXPECT_TRUE(GetActiveTab()->GoBack());
201 208
202 EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness")); 209 EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness"));
203 } 210 }
OLDNEW
« 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