OLD | NEW |
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_access_token_fetcher_imp
l.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_imp
l.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" |
10 #include "google_apis/gaia/fake_oauth2_token_service.h" | 11 #include "google_apis/gaia/fake_oauth2_token_service.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 namespace proximity_auth { | 14 namespace proximity_auth { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 const char kAccountId[] = "account_id"; | 18 const char kAccountId[] = "account_id"; |
18 const char kAccessToken[] = "access_token"; | 19 const char kAccessToken[] = "access_token"; |
19 const char kInvalidResult[] = "invalid_result"; | 20 const char kInvalidResult[] = "invalid_result"; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 fetcher_.FetchAccessToken(base::Bind(SaveAccessToken, &result2)); | 67 fetcher_.FetchAccessToken(base::Bind(SaveAccessToken, &result2)); |
67 EXPECT_EQ(std::string(), result2); | 68 EXPECT_EQ(std::string(), result2); |
68 } | 69 } |
69 | 70 |
70 token_service_.IssueAllTokensForAccount(kAccountId, kAccessToken, | 71 token_service_.IssueAllTokensForAccount(kAccountId, kAccessToken, |
71 base::Time::Max()); | 72 base::Time::Max()); |
72 EXPECT_EQ(kAccessToken, result1); | 73 EXPECT_EQ(kAccessToken, result1); |
73 } | 74 } |
74 | 75 |
75 } // namespace proximity_auth | 76 } // namespace proximity_auth |
OLD | NEW |