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

Unified Diff: chrome/browser/download/download_prefs_unittest.cc

Issue 1982723002: Use FileTypePolicies for download danger classifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_policies
Patch Set: Fix bad rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_prefs.cc ('k') | chrome/browser/download/download_target_determiner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_prefs_unittest.cc
diff --git a/chrome/browser/download/download_prefs_unittest.cc b/chrome/browser/download/download_prefs_unittest.cc
index a6899fdeb4da542e6ccfc2d34a346c496c95dae8..68406f6d03e5b0d18494be9f223c9bf740c9b1de 100644
--- a/chrome/browser/download/download_prefs_unittest.cc
+++ b/chrome/browser/download/download_prefs_unittest.cc
@@ -5,20 +5,22 @@
#include "chrome/browser/download/download_prefs.h"
#include "base/files/file_path.h"
-#include "chrome/browser/download/download_extensions.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/safe_browsing/file_type_policies.h"
#include "chrome/test/base/testing_profile.h"
#include "components/prefs/pref_service.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
+using safe_browsing::FileTypePolicies;
+
TEST(DownloadPrefsTest, Prerequisites) {
// Most of the tests below are based on the assumption that .swf files are not
// allowed to open automatically, and that .txt files are allowed. If this
// assumption changes, then we need to update the tests to match.
- ASSERT_FALSE(download_util::IsAllowedToOpenAutomatically(
+ ASSERT_FALSE(FileTypePolicies::GetInstance()->IsAllowedToOpenAutomatically(
base::FilePath(FILE_PATH_LITERAL("a.swf"))));
- ASSERT_TRUE(download_util::IsAllowedToOpenAutomatically(
+ ASSERT_TRUE(FileTypePolicies::GetInstance()->IsAllowedToOpenAutomatically(
base::FilePath(FILE_PATH_LITERAL("a.txt"))));
}
« no previous file with comments | « chrome/browser/download/download_prefs.cc ('k') | chrome/browser/download/download_target_determiner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698