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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/download/download_prefs.h" | 10 #include "chrome/browser/download/download_prefs.h" |
11 #include "chrome/browser/extensions/extension_apitest.h" | 11 #include "chrome/browser/extensions/extension_apitest.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
15 #include "chrome/common/extensions/api/streams_private.h" | 15 #include "chrome/common/extensions/api/streams_private.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
18 #include "components/prefs/pref_service.h" | 18 #include "components/prefs/pref_service.h" |
19 #include "content/public/browser/download_item.h" | 19 #include "content/public/browser/download_item.h" |
20 #include "content/public/browser/download_manager.h" | 20 #include "content/public/browser/download_manager.h" |
21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
22 #include "content/public/browser/resource_controller.h" | |
23 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
24 #include "content/public/test/download_test_observer.h" | 23 #include "content/public/test/download_test_observer.h" |
25 #include "extensions/browser/event_router.h" | 24 #include "extensions/browser/event_router.h" |
26 #include "extensions/browser/extension_system.h" | 25 #include "extensions/browser/extension_system.h" |
27 #include "extensions/common/manifest_handlers/mime_types_handler.h" | 26 #include "extensions/common/manifest_handlers/mime_types_handler.h" |
28 #include "extensions/test/result_catcher.h" | 27 #include "extensions/test/result_catcher.h" |
29 #include "net/dns/mock_host_resolver.h" | 28 #include "net/dns/mock_host_resolver.h" |
30 #include "net/test/embedded_test_server/embedded_test_server.h" | 29 #include "net/test/embedded_test_server/embedded_test_server.h" |
31 #include "net/test/embedded_test_server/http_request.h" | 30 #include "net/test/embedded_test_server/http_request.h" |
32 #include "net/test/embedded_test_server/http_response.h" | 31 #include "net/test/embedded_test_server/http_response.h" |
33 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
34 | 33 |
35 using content::BrowserContext; | 34 using content::BrowserContext; |
36 using content::BrowserThread; | 35 using content::BrowserThread; |
37 using content::DownloadItem; | 36 using content::DownloadItem; |
38 using content::DownloadManager; | 37 using content::DownloadManager; |
39 using content::DownloadUrlParameters; | 38 using content::DownloadUrlParameters; |
40 using content::ResourceController; | |
41 using content::WebContents; | 39 using content::WebContents; |
42 using extensions::Event; | 40 using extensions::Event; |
43 using extensions::ExtensionSystem; | 41 using extensions::ExtensionSystem; |
44 using extensions::ResultCatcher; | 42 using extensions::ResultCatcher; |
45 using net::test_server::BasicHttpResponse; | 43 using net::test_server::BasicHttpResponse; |
46 using net::test_server::HttpRequest; | 44 using net::test_server::HttpRequest; |
47 using net::test_server::HttpResponse; | 45 using net::test_server::HttpResponse; |
48 using testing::_; | 46 using testing::_; |
49 | 47 |
50 namespace streams_private = extensions::api::streams_private; | 48 namespace streams_private = extensions::api::streams_private; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 base::RunLoop().RunUntilIdle(); | 446 base::RunLoop().RunUntilIdle(); |
449 EXPECT_TRUE(catcher.GetNextResult()); | 447 EXPECT_TRUE(catcher.GetNextResult()); |
450 | 448 |
451 ui_test_utils::NavigateToURL(browser(), | 449 ui_test_utils::NavigateToURL(browser(), |
452 test_server_->GetURL("/abort.rtf")); | 450 test_server_->GetURL("/abort.rtf")); |
453 base::RunLoop().RunUntilIdle(); | 451 base::RunLoop().RunUntilIdle(); |
454 EXPECT_TRUE(catcher.GetNextResult()); | 452 EXPECT_TRUE(catcher.GetNextResult()); |
455 } | 453 } |
456 | 454 |
457 } // namespace | 455 } // namespace |
OLD | NEW |