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_api_call_flow.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_api_call_flow.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/scoped_ptr.h" |
8 #include "base/test/test_simple_task_runner.h" | 9 #include "base/test/test_simple_task_runner.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/url_request/test_url_fetcher_factory.h" | 11 #include "net/url_request/test_url_fetcher_factory.h" |
11 #include "net/url_request/url_request_status.h" | 12 #include "net/url_request/url_request_status.h" |
12 #include "net/url_request/url_request_test_util.h" | 13 #include "net/url_request/url_request_test_util.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace proximity_auth { | 16 namespace proximity_auth { |
16 | 17 |
17 namespace { | 18 namespace { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 143 |
143 // The empty string is a valid protocol buffer message serialization. | 144 // The empty string is a valid protocol buffer message serialization. |
144 TEST_F(ProximityAuthCryptAuthApiCallFlowTest, ResponseWithNoBody) { | 145 TEST_F(ProximityAuthCryptAuthApiCallFlowTest, ResponseWithNoBody) { |
145 StartApiCallFlow(); | 146 StartApiCallFlow(); |
146 CompleteCurrentRequest(net::OK, net::HTTP_OK, std::string()); | 147 CompleteCurrentRequest(net::OK, net::HTTP_OK, std::string()); |
147 EXPECT_EQ(std::string(), *result_); | 148 EXPECT_EQ(std::string(), *result_); |
148 EXPECT_FALSE(error_message_); | 149 EXPECT_FALSE(error_message_); |
149 } | 150 } |
150 | 151 |
151 } // namespace proximity_auth | 152 } // namespace proximity_auth |
OLD | NEW |