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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "base/prefs/pref_service.h" |
10 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
11 #include "base/string_util.h" | 12 #include "base/string_util.h" |
12 #include "base/value_conversions.h" | 13 #include "base/value_conversions.h" |
13 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 14 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
14 #include "chrome/browser/download/download_prefs.h" | 15 #include "chrome/browser/download/download_prefs.h" |
15 #include "chrome/browser/download/download_util.h" | 16 #include "chrome/browser/download/download_util.h" |
16 #include "chrome/browser/prefs/pref_service.h" | |
17 #include "chrome/browser/safe_browsing/download_protection_service.h" | 17 #include "chrome/browser/safe_browsing/download_protection_service.h" |
18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 20 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
21 #include "chrome/test/base/testing_pref_service.h" | 21 #include "chrome/test/base/testing_pref_service.h" |
22 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/browser/web_contents_delegate.h" | 24 #include "content/public/browser/web_contents_delegate.h" |
25 #include "content/public/test/mock_download_item.h" | 25 #include "content/public/test/mock_download_item.h" |
26 #include "content/public/test/mock_download_manager.h" | 26 #include "content/public/test/mock_download_manager.h" |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 // Run the first test case again. Since the last download path was cleared, | 914 // Run the first test case again. Since the last download path was cleared, |
915 // this test case should behave identically to the first time it was run. | 915 // this test case should behave identically to the first time it was run. |
916 RunTestCases(kLastSavePathTestCases, 1); | 916 RunTestCases(kLastSavePathTestCases, 1); |
917 } | 917 } |
918 | 918 |
919 // TODO(asanka): Add more tests. | 919 // TODO(asanka): Add more tests. |
920 // * Default download path is not writable. | 920 // * Default download path is not writable. |
921 // * Download path doesn't exist. | 921 // * Download path doesn't exist. |
922 // * IsDangerousFile(). | 922 // * IsDangerousFile(). |
923 // * Filename generation. | 923 // * Filename generation. |
OLD | NEW |