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

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

Issue 1907043002: Convert //components/prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixes Created 4 years, 8 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/memory/scoped_ptr.h"
8 #include "components/prefs/pref_registry_simple.h" 9 #include "components/prefs/pref_registry_simple.h"
9 #include "components/prefs/testing_pref_service.h" 10 #include "components/prefs/testing_pref_service.h"
10 #include "components/web_resource/web_resource_pref_names.h" 11 #include "components/web_resource/web_resource_pref_names.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace web_resource { 14 namespace web_resource {
14 15
15 class EulaAcceptedNotifierTest : public testing::Test, 16 class EulaAcceptedNotifierTest : public testing::Test,
16 public EulaAcceptedNotifier::Observer { 17 public EulaAcceptedNotifier::Observer {
17 public: 18 public:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 TEST_F(EulaAcceptedNotifierTest, EulaNotInitiallyAccepted) { 72 TEST_F(EulaAcceptedNotifierTest, EulaNotInitiallyAccepted) {
72 EXPECT_FALSE(notifier()->IsEulaAccepted()); 73 EXPECT_FALSE(notifier()->IsEulaAccepted());
73 SetEulaAcceptedPref(); 74 SetEulaAcceptedPref();
74 EXPECT_TRUE(notifier()->IsEulaAccepted()); 75 EXPECT_TRUE(notifier()->IsEulaAccepted());
75 EXPECT_TRUE(eula_accepted_called()); 76 EXPECT_TRUE(eula_accepted_called());
76 // Call it a second time, to ensure the answer doesn't change. 77 // Call it a second time, to ensure the answer doesn't change.
77 EXPECT_TRUE(notifier()->IsEulaAccepted()); 78 EXPECT_TRUE(notifier()->IsEulaAccepted());
78 } 79 }
79 80
80 } // namespace web_resource 81 } // namespace web_resource
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698