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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_registration_utility_unittest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/supervised_user_registration_utility.h" 5 #include "chrome/browser/supervised_user/supervised_user_registration_utility.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 GoogleServiceAuthError error(GoogleServiceAuthError::NONE); 82 GoogleServiceAuthError error(GoogleServiceAuthError::NONE);
83 callback.Run(error, kSupervisedUserToken); 83 callback.Run(error, kSupervisedUserToken);
84 } 84 }
85 }; 85 };
86 86
87 } // namespace 87 } // namespace
88 88
89 class SupervisedUserRegistrationUtilityTest : public ::testing::Test { 89 class SupervisedUserRegistrationUtilityTest : public ::testing::Test {
90 public: 90 public:
91 SupervisedUserRegistrationUtilityTest(); 91 SupervisedUserRegistrationUtilityTest();
92 virtual ~SupervisedUserRegistrationUtilityTest(); 92 ~SupervisedUserRegistrationUtilityTest() override;
93 93
94 virtual void TearDown() override; 94 void TearDown() override;
95 95
96 protected: 96 protected:
97 scoped_ptr<SyncChangeProcessor> CreateChangeProcessor(); 97 scoped_ptr<SyncChangeProcessor> CreateChangeProcessor();
98 scoped_ptr<SyncErrorFactory> CreateErrorFactory(); 98 scoped_ptr<SyncErrorFactory> CreateErrorFactory();
99 SyncData CreateRemoteData(const std::string& id, const std::string& name); 99 SyncData CreateRemoteData(const std::string& id, const std::string& name);
100 100
101 SyncMergeResult StartInitialSync(); 101 SyncMergeResult StartInitialSync();
102 102
103 SupervisedUserRegistrationUtility::RegistrationCallback 103 SupervisedUserRegistrationUtility::RegistrationCallback
104 GetRegistrationCallback(); 104 GetRegistrationCallback();
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 SupervisedUserRegistrationUtility::GenerateNewSupervisedUserId(), 292 SupervisedUserRegistrationUtility::GenerateNewSupervisedUserId(),
293 SupervisedUserRegistrationInfo(base::ASCIIToUTF16("Mike"), 17), 293 SupervisedUserRegistrationInfo(base::ASCIIToUTF16("Mike"), 17),
294 GetRegistrationCallback()); 294 GetRegistrationCallback());
295 EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kSupervisedUsers)->size()); 295 EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kSupervisedUsers)->size());
296 service()->StopSyncing(SUPERVISED_USERS); 296 service()->StopSyncing(SUPERVISED_USERS);
297 EXPECT_EQ(0u, prefs()->GetDictionary(prefs::kSupervisedUsers)->size()); 297 EXPECT_EQ(0u, prefs()->GetDictionary(prefs::kSupervisedUsers)->size());
298 EXPECT_TRUE(received_callback()); 298 EXPECT_TRUE(received_callback());
299 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, error().state()); 299 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, error().state());
300 EXPECT_EQ(std::string(), token()); 300 EXPECT_EQ(std::string(), token());
301 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698