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

Unified Diff: chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc

Issue 1979153002: Use FileTypePolicies for is_archive and is_supported classifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_by_platform
Patch Set: Fix comment, per asanka's review 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
Index: chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc
diff --git a/chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc b/chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc
index 4d09f03ab529f50a10d3086a607a35510b890f88..7a234d0a645d4141c38c23b133ca6db53e0267a0 100644
--- a/chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc
+++ b/chrome/browser/safe_browsing/unverified_download_field_trial_unittest.cc
@@ -9,6 +9,7 @@
#include "base/metrics/field_trial.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/safe_browsing/download_protection_util.h"
+#include "chrome/common/safe_browsing/file_type_policies.h"
#include "components/variations/variations_associated_data.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -56,10 +57,9 @@ class ScopedFieldTrialState {
// Verify some test assumptions. Namely, that kSafeFilename is not a supported
// binary file and that kHandledFilename is.
TEST(UnverifiedDownloadFieldTrialTest, Assumptions) {
- EXPECT_TRUE(download_protection_util::IsSupportedBinaryFile(
- base::FilePath(kHandledFilename)));
- EXPECT_FALSE(download_protection_util::IsSupportedBinaryFile(
- base::FilePath(kSafeFilename)));
+ FileTypePolicies* policies = FileTypePolicies::GetInstance();
+ EXPECT_TRUE(policies->IsCheckedBinaryFile(base::FilePath(kHandledFilename)));
+ EXPECT_FALSE(policies->IsCheckedBinaryFile(base::FilePath(kSafeFilename)));
}
// Verify that disallow-unchecked-dangerous-downloads command line switch causes

Powered by Google App Engine
This is Rietveld 408576698