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

Side by Side Diff: components/safe_browsing/common/safe_browsing_prefs_unittest.cc

Issue 2869383002: Unify safe_browsing* components [1]: move safe_browsing_prefs* (Closed)
Patch Set: fix win bots Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/test/scoped_feature_list.h" 11 #include "base/test/scoped_feature_list.h"
12 #include "components/prefs/pref_registry_simple.h" 12 #include "components/prefs/pref_registry_simple.h"
13 #include "components/prefs/testing_pref_service.h" 13 #include "components/prefs/testing_pref_service.h"
14 #include "components/safe_browsing_db/safe_browsing_prefs.h" 14 #include "components/safe_browsing/common/safe_browsing_prefs.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace safe_browsing { 17 namespace safe_browsing {
18 18
19 class SafeBrowsingPrefsTest : public ::testing::Test { 19 class SafeBrowsingPrefsTest : public ::testing::Test {
20 protected: 20 protected:
21 void SetUp() override { 21 void SetUp() override {
22 prefs_.registry()->RegisterBooleanPref( 22 prefs_.registry()->RegisterBooleanPref(
23 prefs::kSafeBrowsingExtendedReportingEnabled, false); 23 prefs::kSafeBrowsingExtendedReportingEnabled, false);
24 prefs_.registry()->RegisterBooleanPref( 24 prefs_.registry()->RegisterBooleanPref(
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 EXPECT_EQ(SBER_LEVEL_OFF, GetExtendedReportingLevel(prefs_)); 453 EXPECT_EQ(SBER_LEVEL_OFF, GetExtendedReportingLevel(prefs_));
454 // Turning on Scout gives us Scout level reporting 454 // Turning on Scout gives us Scout level reporting
455 ResetPrefs(/*sber=*/false, /*scout_reporting=*/true, /*scout_group=*/true); 455 ResetPrefs(/*sber=*/false, /*scout_reporting=*/true, /*scout_group=*/true);
456 EXPECT_EQ(SBER_LEVEL_SCOUT, GetExtendedReportingLevel(prefs_)); 456 EXPECT_EQ(SBER_LEVEL_SCOUT, GetExtendedReportingLevel(prefs_));
457 // .. and the legacy pref doesn't affect this. 457 // .. and the legacy pref doesn't affect this.
458 ResetPrefs(/*sber=*/true, /*scout_reporting=*/true, /*scout_group=*/true); 458 ResetPrefs(/*sber=*/true, /*scout_reporting=*/true, /*scout_group=*/true);
459 EXPECT_EQ(SBER_LEVEL_SCOUT, GetExtendedReportingLevel(prefs_)); 459 EXPECT_EQ(SBER_LEVEL_SCOUT, GetExtendedReportingLevel(prefs_));
460 } 460 }
461 461
462 } // namespace safe_browsing 462 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing/common/safe_browsing_prefs.cc ('k') | components/safe_browsing_db/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698