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

Side by Side Diff: chrome/browser/services/gcm/gcm_account_tracker_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/services/gcm/gcm_account_tracker.h" 5 #include "chrome/browser/services/gcm/gcm_account_tracker.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 update_accounts_called_ = false; 139 update_accounts_called_ = false;
140 last_connection_observer_ = NULL; 140 last_connection_observer_ = NULL;
141 removed_connection_observer_ = NULL; 141 removed_connection_observer_ = NULL;
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 145
146 class GCMAccountTrackerTest : public testing::Test { 146 class GCMAccountTrackerTest : public testing::Test {
147 public: 147 public:
148 GCMAccountTrackerTest(); 148 GCMAccountTrackerTest();
149 virtual ~GCMAccountTrackerTest(); 149 ~GCMAccountTrackerTest() override;
150 150
151 // Helpers to pass fake events to the tracker. Tests should have either a pair 151 // Helpers to pass fake events to the tracker. Tests should have either a pair
152 // of Start/FinishAccountSignIn or SignInAccount per account. Don't mix. 152 // of Start/FinishAccountSignIn or SignInAccount per account. Don't mix.
153 // Call to SignOutAccount is not mandatory. 153 // Call to SignOutAccount is not mandatory.
154 void StartAccountSignIn(const std::string& account_key); 154 void StartAccountSignIn(const std::string& account_key);
155 void FinishAccountSignIn(const std::string& account_key); 155 void FinishAccountSignIn(const std::string& account_key);
156 void SignInAccount(const std::string& account_key); 156 void SignInAccount(const std::string& account_key);
157 void SignOutAccount(const std::string& account_key); 157 void SignOutAccount(const std::string& account_key);
158 158
159 // Helpers for dealing with OAuth2 access token requests. 159 // Helpers for dealing with OAuth2 access token requests.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // clean it up before the SetAccessToken is called. This also means a new 418 // clean it up before the SetAccessToken is called. This also means a new
419 // token request will be issued 419 // token request will be issued
420 EXPECT_FALSE(driver()->update_accounts_called()); 420 EXPECT_FALSE(driver()->update_accounts_called());
421 EXPECT_EQ(1UL, tracker()->get_pending_token_request_count()); 421 EXPECT_EQ(1UL, tracker()->get_pending_token_request_count());
422 } 422 }
423 423
424 // TODO(fgorski): Add test for adding account after removal >> make sure it does 424 // TODO(fgorski): Add test for adding account after removal >> make sure it does
425 // not mark removal. 425 // not mark removal.
426 426
427 } // namespace gcm 427 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698