| 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 #include "content/browser/loader/mojo_async_resource_handler.h" | 5 #include "content/browser/loader/mojo_async_resource_handler.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 : public MojoAsyncResourceHandler { | 217 : public MojoAsyncResourceHandler { |
| 218 public: | 218 public: |
| 219 MojoAsyncResourceHandlerWithStubOperations( | 219 MojoAsyncResourceHandlerWithStubOperations( |
| 220 net::URLRequest* request, | 220 net::URLRequest* request, |
| 221 ResourceDispatcherHostImpl* rdh, | 221 ResourceDispatcherHostImpl* rdh, |
| 222 mojom::URLLoaderAssociatedRequest mojo_request, | 222 mojom::URLLoaderAssociatedRequest mojo_request, |
| 223 mojom::URLLoaderClientAssociatedPtr url_loader_client) | 223 mojom::URLLoaderClientAssociatedPtr url_loader_client) |
| 224 : MojoAsyncResourceHandler(request, | 224 : MojoAsyncResourceHandler(request, |
| 225 rdh, | 225 rdh, |
| 226 std::move(mojo_request), | 226 std::move(mojo_request), |
| 227 std::move(url_loader_client), | 227 std::move(url_loader_client)), |
| 228 RESOURCE_TYPE_MAIN_FRAME), | |
| 229 task_runner_(new base::TestSimpleTaskRunner) {} | 228 task_runner_(new base::TestSimpleTaskRunner) {} |
| 230 ~MojoAsyncResourceHandlerWithStubOperations() override {} | 229 ~MojoAsyncResourceHandlerWithStubOperations() override {} |
| 231 | 230 |
| 232 void ResetBeginWriteExpectation() { is_begin_write_expectation_set_ = false; } | 231 void ResetBeginWriteExpectation() { is_begin_write_expectation_set_ = false; } |
| 233 | 232 |
| 234 void set_begin_write_expectation(MojoResult begin_write_expectation) { | 233 void set_begin_write_expectation(MojoResult begin_write_expectation) { |
| 235 is_begin_write_expectation_set_ = true; | 234 is_begin_write_expectation_set_ = true; |
| 236 begin_write_expectation_ = begin_write_expectation; | 235 begin_write_expectation_ = begin_write_expectation; |
| 237 } | 236 } |
| 238 void set_end_write_expectation(MojoResult end_write_expectation) { | 237 void set_end_write_expectation(MojoResult end_write_expectation) { |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 } | 1261 } |
| 1263 } | 1262 } |
| 1264 EXPECT_EQ("B", body); | 1263 EXPECT_EQ("B", body); |
| 1265 } | 1264 } |
| 1266 | 1265 |
| 1267 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, | 1266 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, |
| 1268 MojoAsyncResourceHandlerWithAllocationSizeTest, | 1267 MojoAsyncResourceHandlerWithAllocationSizeTest, |
| 1269 ::testing::Values(8, 32 * 2014)); | 1268 ::testing::Values(8, 32 * 2014)); |
| 1270 } // namespace | 1269 } // namespace |
| 1271 } // namespace content | 1270 } // namespace content |
| OLD | NEW |