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_client_impl.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_client_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" |
8 #include "base/test/null_task_runner.h" | 9 #include "base/test/null_task_runner.h" |
9 #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h" | 10 #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h" |
10 #include "components/proximity_auth/cryptauth/cryptauth_api_call_flow.h" | 11 #include "components/proximity_auth/cryptauth/cryptauth_api_call_flow.h" |
11 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | 12 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" |
12 #include "components/proximity_auth/cryptauth/switches.h" | 13 #include "components/proximity_auth/cryptauth/switches.h" |
13 #include "google_apis/gaia/fake_oauth2_token_service.h" | 14 #include "google_apis/gaia/fake_oauth2_token_service.h" |
14 #include "net/url_request/test_url_fetcher_factory.h" | 15 #include "net/url_request/test_url_fetcher_factory.h" |
15 #include "net/url_request/url_request_test_util.h" | 16 #include "net/url_request/url_request_test_util.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 cryptauth::GetMyDevicesRequest request_proto; | 551 cryptauth::GetMyDevicesRequest request_proto; |
551 request_proto.set_allow_stale_read(true); | 552 request_proto.set_allow_stale_read(true); |
552 client_->GetMyDevices( | 553 client_->GetMyDevices( |
553 request_proto, | 554 request_proto, |
554 base::Bind(&SaveResult<cryptauth::GetMyDevicesResponse>, &result_proto), | 555 base::Bind(&SaveResult<cryptauth::GetMyDevicesResponse>, &result_proto), |
555 base::Bind(&NotCalled<std::string>)); | 556 base::Bind(&NotCalled<std::string>)); |
556 EXPECT_EQ(kAccessToken, client_->GetAccessTokenUsed()); | 557 EXPECT_EQ(kAccessToken, client_->GetAccessTokenUsed()); |
557 } | 558 } |
558 | 559 |
559 } // namespace proximity_auth | 560 } // namespace proximity_auth |
OLD | NEW |