OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/net/url_request_mock_util.h" | 7 #include "chrome/browser/net/url_request_mock_util.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| 11 #include "chrome/test/base/test_navigation_observer.h" |
11 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
12 #include "chrome/test/test_navigation_observer.h" | |
13 #include "content/browser/net/url_request_failed_dns_job.h" | 13 #include "content/browser/net/url_request_failed_dns_job.h" |
14 #include "content/browser/net/url_request_mock_http_job.h" | 14 #include "content/browser/net/url_request_mock_http_job.h" |
15 | 15 |
16 using content::BrowserThread; | 16 using content::BrowserThread; |
17 | 17 |
18 class ErrorPageTest : public InProcessBrowserTest { | 18 class ErrorPageTest : public InProcessBrowserTest { |
19 public: | 19 public: |
20 enum HistoryNavigationDirection { | 20 enum HistoryNavigationDirection { |
21 HISTORY_NAVIGATE_BACK, | 21 HISTORY_NAVIGATE_BACK, |
22 HISTORY_NAVIGATE_FORWARD, | 22 HISTORY_NAVIGATE_FORWARD, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 | 186 |
187 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. | 187 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. |
188 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) { | 188 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) { |
189 NavigateToURLAndWaitForTitle( | 189 NavigateToURLAndWaitForTitle( |
190 URLRequestMockHTTPJob::GetMockUrl( | 190 URLRequestMockHTTPJob::GetMockUrl( |
191 FilePath(FILE_PATH_LITERAL("page404.html"))), | 191 FilePath(FILE_PATH_LITERAL("page404.html"))), |
192 "SUCCESS", | 192 "SUCCESS", |
193 1); | 193 1); |
194 } | 194 } |
OLD | NEW |