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

Side by Side Diff: components/web_resource/eula_accepted_notifier_unittest.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/web_resource/eula_accepted_notifier.h" 5 #include "components/web_resource/eula_accepted_notifier.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/prefs/pref_registry_simple.h" 8 #include "components/prefs/pref_registry_simple.h"
9 #include "base/prefs/testing_pref_service.h" 9 #include "components/prefs/testing_pref_service.h"
10 #include "components/web_resource/web_resource_pref_names.h" 10 #include "components/web_resource/web_resource_pref_names.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace web_resource { 13 namespace web_resource {
14 14
15 class EulaAcceptedNotifierTest : public testing::Test, 15 class EulaAcceptedNotifierTest : public testing::Test,
16 public EulaAcceptedNotifier::Observer { 16 public EulaAcceptedNotifier::Observer {
17 public: 17 public:
18 EulaAcceptedNotifierTest() : eula_accepted_called_(false) { 18 EulaAcceptedNotifierTest() : eula_accepted_called_(false) {
19 } 19 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 TEST_F(EulaAcceptedNotifierTest, EulaNotInitiallyAccepted) { 71 TEST_F(EulaAcceptedNotifierTest, EulaNotInitiallyAccepted) {
72 EXPECT_FALSE(notifier()->IsEulaAccepted()); 72 EXPECT_FALSE(notifier()->IsEulaAccepted());
73 SetEulaAcceptedPref(); 73 SetEulaAcceptedPref();
74 EXPECT_TRUE(notifier()->IsEulaAccepted()); 74 EXPECT_TRUE(notifier()->IsEulaAccepted());
75 EXPECT_TRUE(eula_accepted_called()); 75 EXPECT_TRUE(eula_accepted_called());
76 // Call it a second time, to ensure the answer doesn't change. 76 // Call it a second time, to ensure the answer doesn't change.
77 EXPECT_TRUE(notifier()->IsEulaAccepted()); 77 EXPECT_TRUE(notifier()->IsEulaAccepted());
78 } 78 }
79 79
80 } // namespace web_resource 80 } // namespace web_resource
OLDNEW
« no previous file with comments | « components/web_resource/eula_accepted_notifier.cc ('k') | components/web_resource/notification_promo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698