| 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 "content/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 sync_load_response.encoded_data_length = kEncodedDataLength; | 707 sync_load_response.encoded_data_length = kEncodedDataLength; |
| 708 dispatcher()->set_sync_load_response(sync_load_response); | 708 dispatcher()->set_sync_load_response(sync_load_response); |
| 709 | 709 |
| 710 blink::WebURLResponse response; | 710 blink::WebURLResponse response; |
| 711 blink::WebURLError error; | 711 blink::WebURLError error; |
| 712 blink::WebData data; | 712 blink::WebData data; |
| 713 int64_t encoded_data_length = 0; | 713 int64_t encoded_data_length = 0; |
| 714 client()->loader()->loadSynchronously(request, response, error, data, | 714 client()->loader()->loadSynchronously(request, response, error, data, |
| 715 encoded_data_length); | 715 encoded_data_length); |
| 716 | 716 |
| 717 EXPECT_EQ(kEncodedBodyLength, response.encodedBodyLength()); | 717 EXPECT_EQ(kEncodedBodyLength, response.encodedBodyLengthForTesting()); |
| 718 EXPECT_EQ(kEncodedDataLength, encoded_data_length); | 718 EXPECT_EQ(kEncodedDataLength, encoded_data_length); |
| 719 int expected_decoded_body_length = strlen(kBodyData); | 719 int expected_decoded_body_length = strlen(kBodyData); |
| 720 EXPECT_EQ(expected_decoded_body_length, response.decodedBodyLength()); | 720 EXPECT_EQ(expected_decoded_body_length, |
| 721 response.decodedBodyLengthForTesting()); |
| 721 } | 722 } |
| 722 | 723 |
| 723 } // namespace | 724 } // namespace |
| 724 } // namespace content | 725 } // namespace content |
| OLD | NEW |