| OLD | NEW |
| 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 #if defined(OS_WIN) | 6 #if defined(OS_WIN) |
| 7 #include "base/win_util.h" | 7 #include "base/win_util.h" |
| 8 #endif // defined(OS_WIN) | 8 #endif // defined(OS_WIN) |
| 9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
| 10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 FilePath(FILE_PATH_LITERAL("title2.html")))); | 236 FilePath(FILE_PATH_LITERAL("title2.html")))); |
| 237 // The first navigation should fail, and the second one should be the error | 237 // The first navigation should fail, and the second one should be the error |
| 238 // page. | 238 // page. |
| 239 NavigateToURLBlockUntilNavigationsComplete( | 239 NavigateToURLBlockUntilNavigationsComplete( |
| 240 URLRequestMockHTTPJob::GetMockUrl( | 240 URLRequestMockHTTPJob::GetMockUrl( |
| 241 FilePath(FILE_PATH_LITERAL("page404.html"))), 2); | 241 FilePath(FILE_PATH_LITERAL("page404.html"))), 2); |
| 242 | 242 |
| 243 EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor")); | 243 EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor")); |
| 244 } | 244 } |
| 245 | 245 |
| 246 #if defined(OS_LINUX) |
| 247 // Below explains this is flaky on XP, but it also flakes out on Linux. |
| 248 // http://crbug.com/19361 |
| 249 #define Page404_GoBack FLAKY_Page404_GoBack |
| 250 #endif |
| 251 |
| 246 TEST_F(ErrorPageTest, Page404_GoBack) { | 252 TEST_F(ErrorPageTest, Page404_GoBack) { |
| 247 #if defined(OS_WIN) | 253 #if defined(OS_WIN) |
| 248 // Flaky on XP, http://crbug.com/19361. | 254 // Flaky on XP, http://crbug.com/19361. |
| 249 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) | 255 if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) |
| 250 return; | 256 return; |
| 251 #endif // defined(OS_WIN) | 257 #endif // defined(OS_WIN) |
| 252 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl( | 258 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl( |
| 253 FilePath(FILE_PATH_LITERAL("title2.html")))); | 259 FilePath(FILE_PATH_LITERAL("title2.html")))); |
| 254 // The first navigation should fail, and the second one should be the error | 260 // The first navigation should fail, and the second one should be the error |
| 255 // page. | 261 // page. |
| 256 NavigateToURLBlockUntilNavigationsComplete( | 262 NavigateToURLBlockUntilNavigationsComplete( |
| 257 URLRequestMockHTTPJob::GetMockUrl( | 263 URLRequestMockHTTPJob::GetMockUrl( |
| 258 FilePath(FILE_PATH_LITERAL("page404.html"))), 2); | 264 FilePath(FILE_PATH_LITERAL("page404.html"))), 2); |
| 259 EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor")); | 265 EXPECT_TRUE(WaitForTitleMatching(L"Mock Link Doctor")); |
| 260 | 266 |
| 261 EXPECT_TRUE(GetActiveTab()->GoBack()); | 267 EXPECT_TRUE(GetActiveTab()->GoBack()); |
| 262 | 268 |
| 263 EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness")); | 269 EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness")); |
| 264 } | 270 } |
| OLD | NEW |