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

Side by Side Diff: chrome/browser/policy/managed_prefs_banner_base_unittest.cc

Issue 3203008: Move prefs-related files under chrome/browser/ into a prefs/ subdir. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/dummy_pref_store.h" 5 #include "chrome/browser/policy/managed_prefs_banner_base.h"
6 #include "chrome/browser/managed_prefs_banner_base.h" 6 #include "chrome/browser/prefs/dummy_pref_store.h"
7 #include "chrome/common/pref_names.h" 7 #include "chrome/common/pref_names.h"
8 #include "chrome/test/testing_pref_service.h" 8 #include "chrome/test/testing_pref_service.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 // Tests whether managed preferences banner base functionality correctly 12 // Tests whether managed preferences banner base functionality correctly
13 // determines banner visiblity. 13 // determines banner visiblity.
14 class ManagedPrefsBannerBaseTest : public testing::Test { 14 class ManagedPrefsBannerBaseTest : public testing::Test {
15 public: 15 public:
16 virtual void SetUp() { 16 virtual void SetUp() {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 banner.AddLocalStatePref(prefs::kMetricsReportingEnabled); 71 banner.AddLocalStatePref(prefs::kMetricsReportingEnabled);
72 EXPECT_CALL(banner, OnUpdateVisibility()).Times(0); 72 EXPECT_CALL(banner, OnUpdateVisibility()).Times(0);
73 user_prefs_->SetBoolean(prefs::kHomePageIsNewTabPage, true); 73 user_prefs_->SetBoolean(prefs::kHomePageIsNewTabPage, true);
74 EXPECT_CALL(banner, OnUpdateVisibility()).Times(1); 74 EXPECT_CALL(banner, OnUpdateVisibility()).Times(1);
75 user_prefs_->SetManagedPref(prefs::kSearchSuggestEnabled, 75 user_prefs_->SetManagedPref(prefs::kSearchSuggestEnabled,
76 Value::CreateBooleanValue(false)); 76 Value::CreateBooleanValue(false));
77 EXPECT_CALL(banner, OnUpdateVisibility()).Times(1); 77 EXPECT_CALL(banner, OnUpdateVisibility()).Times(1);
78 local_state_->SetManagedPref(prefs::kMetricsReportingEnabled, 78 local_state_->SetManagedPref(prefs::kMetricsReportingEnabled,
79 Value::CreateBooleanValue(true)); 79 Value::CreateBooleanValue(true));
80 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698