OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "content/browser/download/download_manager_impl.h" | 7 #include "content/browser/download/download_manager_impl.h" |
8 #include "content/browser/web_contents/web_contents_impl.h" | 8 #include "content/browser/web_contents/web_contents_impl.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
12 #include "content/public/browser/notification_types.h" | 12 #include "content/public/browser/notification_types.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "content/public/common/url_constants.h" | 14 #include "content/public/common/url_constants.h" |
15 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
16 #include "content/public/test/test_utils.h" | 16 #include "content/public/test/test_utils.h" |
17 #include "content/shell/shell.h" | 17 #include "content/shell/shell.h" |
18 #include "content/test/content_browser_test.h" | 18 #include "content/test/content_browser_test.h" |
19 #include "content/test/content_browser_test_utils.h" | 19 #include "content/test/content_browser_test_utils.h" |
20 #include "content/test/net/url_request_failed_job.h" | 20 #include "content/test/net/url_request_failed_job.h" |
21 #include "content/test/net/url_request_mock_http_job.h" | 21 #include "content/test/net/url_request_mock_http_job.h" |
22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
23 #include "net/test/embedded_test_server/embedded_test_server.h" | 23 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 24 #include "net/test/embedded_test_server/http_request.h" |
24 #include "net/test/embedded_test_server/http_response.h" | 25 #include "net/test/embedded_test_server/http_response.h" |
25 #include "net/test/embedded_test_server/http_request.h" | |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 class ResourceDispatcherHostBrowserTest : public ContentBrowserTest, | 29 class ResourceDispatcherHostBrowserTest : public ContentBrowserTest, |
30 public DownloadManager::Observer { | 30 public DownloadManager::Observer { |
31 public: | 31 public: |
32 ResourceDispatcherHostBrowserTest() : got_downloads_(false) {} | 32 ResourceDispatcherHostBrowserTest() : got_downloads_(false) {} |
33 | 33 |
34 protected: | 34 protected: |
35 virtual void SetUpOnMainThread() OVERRIDE { | 35 virtual void SetUpOnMainThread() OVERRIDE { |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 CrossSiteFailedRequest) { | 414 CrossSiteFailedRequest) { |
415 // Visit another URL first to trigger a cross-site navigation. | 415 // Visit another URL first to trigger a cross-site navigation. |
416 NavigateToURL(shell(), GetTestUrl("", "simple_page.html")); | 416 NavigateToURL(shell(), GetTestUrl("", "simple_page.html")); |
417 | 417 |
418 // Visit a URL that fails without calling ResourceDispatcherHost::Read. | 418 // Visit a URL that fails without calling ResourceDispatcherHost::Read. |
419 GURL broken_url("chrome://theme"); | 419 GURL broken_url("chrome://theme"); |
420 NavigateToURL(shell(), broken_url); | 420 NavigateToURL(shell(), broken_url); |
421 } | 421 } |
422 | 422 |
423 } // namespace content | 423 } // namespace content |
OLD | NEW |