Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: chrome/browser/download/chrome_download_manager_delegate_unittest.cc

Issue 10500016: Move test_browser_thread.h from content\test to content\public\test. This way we can enforce that i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/value_conversions.h" 10 #include "base/value_conversions.h"
11 #include "chrome/browser/download/chrome_download_manager_delegate.h" 11 #include "chrome/browser/download/chrome_download_manager_delegate.h"
12 #include "chrome/browser/download/download_prefs.h" 12 #include "chrome/browser/download/download_prefs.h"
13 #include "chrome/browser/download/download_util.h" 13 #include "chrome/browser/download/download_util.h"
14 #include "chrome/browser/prefs/pref_service.h" 14 #include "chrome/browser/prefs/pref_service.h"
15 #include "chrome/browser/safe_browsing/download_protection_service.h" 15 #include "chrome/browser/safe_browsing/download_protection_service.h"
16 #include "chrome/common/extensions/extension.h" 16 #include "chrome/common/extensions/extension.h"
17 #include "chrome/common/extensions/extension_switch_utils.h" 17 #include "chrome/common/extensions/extension_switch_utils.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "chrome/test/base/testing_pref_service.h" 19 #include "chrome/test/base/testing_pref_service.h"
20 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
21 #include "content/public/test/mock_download_item.h" 21 #include "content/public/test/mock_download_item.h"
22 #include "content/public/test/mock_download_manager.h" 22 #include "content/public/test/mock_download_manager.h"
23 #include "content/test/test_browser_thread.h" 23 #include "content/public/test/test_browser_thread.h"
24 #include "testing/gmock/include/gmock/gmock.h" 24 #include "testing/gmock/include/gmock/gmock.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 using content::DownloadItem; 27 using content::DownloadItem;
28 using safe_browsing::DownloadProtectionService; 28 using safe_browsing::DownloadProtectionService;
29 using ::testing::AtMost; 29 using ::testing::AtMost;
30 using ::testing::Invoke; 30 using ::testing::Invoke;
31 using ::testing::Return; 31 using ::testing::Return;
32 using ::testing::ReturnPointee; 32 using ::testing::ReturnPointee;
33 using ::testing::ReturnRef; 33 using ::testing::ReturnRef;
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 set_clean_marker_files(false); 1021 set_clean_marker_files(false);
1022 for (unsigned i = 0; i < arraysize(kConflictingDownloadsTestCases); ++i) 1022 for (unsigned i = 0; i < arraysize(kConflictingDownloadsTestCases); ++i)
1023 RunTestCase(kConflictingDownloadsTestCases[i], i); 1023 RunTestCase(kConflictingDownloadsTestCases[i], i);
1024 } 1024 }
1025 1025
1026 // TODO(asanka): Add more tests. 1026 // TODO(asanka): Add more tests.
1027 // * Default download path is not writable. 1027 // * Default download path is not writable.
1028 // * Download path doesn't exist. 1028 // * Download path doesn't exist.
1029 // * IsDangerousFile(). 1029 // * IsDangerousFile().
1030 // * Filename generation. 1030 // * Filename generation.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698