Chromium Code Reviews| Index: components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc |
| diff --git a/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc |
| index 2d1cf5cdf506dad2deb6b50575975ae321c0ffc4..53417e724249443f91fb9a51f48b800769b59723 100644 |
| --- a/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc |
| +++ b/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc |
| @@ -102,6 +102,8 @@ class ProximityAuthCryptAuthApiCallFlowTest |
| scoped_refptr<net::TestURLRequestContextGetter> url_request_context_getter_; |
| scoped_ptr<net::TestURLFetcherFactory> url_fetcher_factory_; |
| CryptAuthApiCallFlow flow_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ProximityAuthCryptAuthApiCallFlowTest); |
| }; |
| TEST_F(ProximityAuthCryptAuthApiCallFlowTest, RequestSuccess) { |
| @@ -128,12 +130,13 @@ TEST_F(ProximityAuthCryptAuthApiCallFlowTest, RequestStatus500) { |
| EXPECT_EQ("HTTP status: 500", *error_message_); |
| } |
| +// The empty string is a valid protocol buffer message serialization. |
| TEST_F(ProximityAuthCryptAuthApiCallFlowTest, ResponseWithNoBody) { |
| StartApiCallFlow(); |
| CompleteCurrentRequest( |
| net::URLRequestStatus::SUCCESS, net::HTTP_OK, std::string()); |
| - EXPECT_FALSE(result_); |
| - EXPECT_EQ("No response body", *error_message_); |
| + EXPECT_EQ(std::string(), *result_); |
| + EXPECT_FALSE(error_message_); |
| } |
|
Ilya Sherman
2014/12/10 23:38:29
Please add a new test to provide coverage for the
Tim Song
2014/12/11 00:12:55
Hmm... I'm note sure how to force this error, as t
|
| } // namespace proximity_auth |