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

Side by Side Diff: components/proximity_auth/cryptauth/cryptauth_account_token_fetcher_unittest.cc

Issue 824513003: Standardize usage of virtual/override/final specifiers in components/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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 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 "components/proximity_auth/cryptauth/cryptauth_account_token_fetcher.h" 5 #include "components/proximity_auth/cryptauth/cryptauth_account_token_fetcher.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "google_apis/gaia/fake_oauth2_token_service.h" 10 #include "google_apis/gaia/fake_oauth2_token_service.h"
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 class ProximityAuthCryptAuthAccountTokenFetcherTest : public testing::Test { 28 class ProximityAuthCryptAuthAccountTokenFetcherTest : public testing::Test {
29 protected: 29 protected:
30 ProximityAuthCryptAuthAccountTokenFetcherTest() 30 ProximityAuthCryptAuthAccountTokenFetcherTest()
31 : fetcher_(&token_service_, kAccountId) { 31 : fetcher_(&token_service_, kAccountId) {
32 token_service_.AddAccount(kAccountId); 32 token_service_.AddAccount(kAccountId);
33 } 33 }
34 virtual ~ProximityAuthCryptAuthAccountTokenFetcherTest() {}
35 34
36 FakeOAuth2TokenService token_service_; 35 FakeOAuth2TokenService token_service_;
37 CryptAuthAccountTokenFetcher fetcher_; 36 CryptAuthAccountTokenFetcher fetcher_;
38 37
39 DISALLOW_COPY_AND_ASSIGN(ProximityAuthCryptAuthAccountTokenFetcherTest); 38 DISALLOW_COPY_AND_ASSIGN(ProximityAuthCryptAuthAccountTokenFetcherTest);
40 }; 39 };
41 40
42 TEST_F(ProximityAuthCryptAuthAccountTokenFetcherTest, FetchSuccess) { 41 TEST_F(ProximityAuthCryptAuthAccountTokenFetcherTest, FetchSuccess) {
43 std::string result; 42 std::string result;
44 fetcher_.FetchAccessToken(base::Bind(SaveAccessToken, &result)); 43 fetcher_.FetchAccessToken(base::Bind(SaveAccessToken, &result));
(...skipping 22 matching lines...) Expand all
67 fetcher_.FetchAccessToken(base::Bind(SaveAccessToken, &result2)); 66 fetcher_.FetchAccessToken(base::Bind(SaveAccessToken, &result2));
68 EXPECT_EQ(std::string(), result2); 67 EXPECT_EQ(std::string(), result2);
69 } 68 }
70 69
71 token_service_.IssueAllTokensForAccount(kAccountId, kAccessToken, 70 token_service_.IssueAllTokensForAccount(kAccountId, kAccessToken,
72 base::Time::Max()); 71 base::Time::Max());
73 EXPECT_EQ(kAccessToken, result1); 72 EXPECT_EQ(kAccessToken, result1);
74 } 73 }
75 74
76 } // namespace proximity_auth 75 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698