| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import <Foundation/Foundation.h> | 5 #import <Foundation/Foundation.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <list> | 7 #include <list> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Test results. | 120 // Test results. |
| 121 ResponseStep response_step; | 121 ResponseStep response_step; |
| 122 char* read_buffer; | 122 char* read_buffer; |
| 123 std::map<std::string, std::string> response_headers; | 123 std::map<std::string, std::string> response_headers; |
| 124 std::map<std::string, std::string> response_trailers; | 124 std::map<std::string, std::string> response_trailers; |
| 125 std::vector<std::string> read_data; | 125 std::vector<std::string> read_data; |
| 126 int net_error; | 126 int net_error; |
| 127 | 127 |
| 128 TestBidirectionalStreamCallback() | 128 TestBidirectionalStreamCallback() |
| 129 : stream(nullptr), | 129 : stream(nullptr), |
| 130 stream_done_event(true, false), | 130 stream_done_event(base::WaitableEvent::ResetPolicy::MANUAL, |
| 131 base::WaitableEvent::InitialState::NOT_SIGNALED), |
| 131 expected_negotiated_protocol("quic/1+spdy/3"), | 132 expected_negotiated_protocol("quic/1+spdy/3"), |
| 132 cancel_from_step(NOTHING), | 133 cancel_from_step(NOTHING), |
| 133 read_buffer_size(32768), | 134 read_buffer_size(32768), |
| 134 response_step(NOTHING), | 135 response_step(NOTHING), |
| 135 read_buffer(nullptr), | 136 read_buffer(nullptr), |
| 136 net_error(0) {} | 137 net_error(0) {} |
| 137 | 138 |
| 138 ~TestBidirectionalStreamCallback() { | 139 ~TestBidirectionalStreamCallback() { |
| 139 if (read_buffer) | 140 if (read_buffer) |
| 140 delete read_buffer; | 141 delete read_buffer; |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 cronet_bidirectional_stream_start(test.stream, "https://notfound.example.com", | 438 cronet_bidirectional_stream_start(test.stream, "https://notfound.example.com", |
| 438 0, "GET", &kTestHeadersArray, true); | 439 0, "GET", &kTestHeadersArray, true); |
| 439 test.BlockForDone(); | 440 test.BlockForDone(); |
| 440 ASSERT_TRUE(test.read_data.empty()); | 441 ASSERT_TRUE(test.read_data.empty()); |
| 441 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step); | 442 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step); |
| 442 ASSERT_EQ(net::ERR_NAME_NOT_RESOLVED, test.net_error); | 443 ASSERT_EQ(net::ERR_NAME_NOT_RESOLVED, test.net_error); |
| 443 cronet_bidirectional_stream_destroy(test.stream); | 444 cronet_bidirectional_stream_destroy(test.stream); |
| 444 } | 445 } |
| 445 | 446 |
| 446 } // namespace cronet | 447 } // namespace cronet |
| OLD | NEW |