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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/prefs/pref_service.h" | |
15 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
16 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
17 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
18 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
19 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
20 #include "base/value_conversions.h" | 19 #include "base/value_conversions.h" |
21 #include "build/build_config.h" | 20 #include "build/build_config.h" |
22 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 21 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
23 #include "chrome/browser/download/download_extensions.h" | 22 #include "chrome/browser/download/download_extensions.h" |
24 #include "chrome/browser/download/download_prefs.h" | 23 #include "chrome/browser/download/download_prefs.h" |
25 #include "chrome/browser/download/download_target_determiner.h" | 24 #include "chrome/browser/download/download_target_determiner.h" |
26 #include "chrome/browser/download/download_target_info.h" | 25 #include "chrome/browser/download/download_target_info.h" |
27 #include "chrome/browser/history/history_service_factory.h" | 26 #include "chrome/browser/history/history_service_factory.h" |
28 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
29 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 28 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
30 #include "chrome/test/base/testing_profile.h" | 29 #include "chrome/test/base/testing_profile.h" |
31 #include "components/history/core/browser/history_service.h" | 30 #include "components/history/core/browser/history_service.h" |
32 #include "components/history/core/browser/history_types.h" | 31 #include "components/history/core/browser/history_types.h" |
| 32 #include "components/prefs/pref_service.h" |
33 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 33 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
34 #include "content/public/browser/download_interrupt_reasons.h" | 34 #include "content/public/browser/download_interrupt_reasons.h" |
35 #include "content/public/browser/render_process_host.h" | 35 #include "content/public/browser/render_process_host.h" |
36 #include "content/public/browser/web_contents.h" | 36 #include "content/public/browser/web_contents.h" |
37 #include "content/public/browser/web_contents_delegate.h" | 37 #include "content/public/browser/web_contents_delegate.h" |
38 #include "content/public/test/mock_download_item.h" | 38 #include "content/public/test/mock_download_item.h" |
39 #include "content/public/test/test_renderer_host.h" | 39 #include "content/public/test/test_renderer_host.h" |
40 #include "content/public/test/web_contents_tester.h" | 40 #include "content/public/test/web_contents_tester.h" |
41 #include "net/base/mime_util.h" | 41 #include "net/base/mime_util.h" |
42 #include "testing/gmock/include/gmock/gmock.h" | 42 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 EXPECT_CALL(mock_plugin_filter_, MockPluginAvailable(npapi_plugin.path())) | 2055 EXPECT_CALL(mock_plugin_filter_, MockPluginAvailable(npapi_plugin.path())) |
2056 .WillRepeatedly(Return(true)); | 2056 .WillRepeatedly(Return(true)); |
2057 | 2057 |
2058 target_info = RunDownloadTargetDeterminer( | 2058 target_info = RunDownloadTargetDeterminer( |
2059 GetPathInDownloadDir(kInitialPath), item.get()); | 2059 GetPathInDownloadDir(kInitialPath), item.get()); |
2060 EXPECT_FALSE(target_info->is_filetype_handled_safely); | 2060 EXPECT_FALSE(target_info->is_filetype_handled_safely); |
2061 } | 2061 } |
2062 #endif // defined(ENABLE_PLUGINS) | 2062 #endif // defined(ENABLE_PLUGINS) |
2063 | 2063 |
2064 } // namespace | 2064 } // namespace |
OLD | NEW |