| Index: content/browser/loader/resource_dispatcher_host_unittest.cc
|
| diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
|
| index e1150424ec5991043a6fc6a98547cbd0a6e8e68b..b742e343266eab61adaff73077f6f8821cc2dacd 100644
|
| --- a/content/browser/loader/resource_dispatcher_host_unittest.cc
|
| +++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
|
| @@ -835,7 +835,7 @@ class TestWebContentsObserver : public WebContentsObserver {
|
| // Information used to create resource requests that use URLRequestLoadInfoJobs.
|
| // The child_id is just that of ResourceDispatcherHostTest::filter_.
|
| struct LoadInfoTestRequestInfo {
|
| - int route_id;
|
| + GlobalFrameRoutingId route_id;
|
| GURL url;
|
| net::LoadState load_state;
|
| net::UploadProgress upload_progress;
|
| @@ -936,7 +936,9 @@ class ResourceDispatcherHostTest : public testing::TestWithParam<TestConfig>,
|
| loader_test_request_info_.reset(
|
| new LoadInfoTestRequestInfo(request_info[i]));
|
| wait_for_request_create_loop_.reset(new base::RunLoop());
|
| - MakeTestRequest(request_info[i].route_id, i + 1, request_info[i].url);
|
| + MakeTestRequestWithRenderFrame(
|
| + 0, request_info[i].route_id.frame_routing_id, i + 1,
|
| + request_info[i].url, RESOURCE_TYPE_SUB_RESOURCE);
|
| wait_for_request_create_loop_->Run();
|
| wait_for_request_create_loop_.reset();
|
| }
|
| @@ -3600,19 +3602,13 @@ TEST_P(ResourceDispatcherHostTest, LoadInfoNoRequests) {
|
| // Tests GetLoadInfoForAllRoutes when there are 3 requests from the same
|
| // RenderView. The second one is farthest along.
|
| TEST_P(ResourceDispatcherHostTest, LoadInfo) {
|
| - const GlobalRoutingID kId(filter_->child_id(), 0);
|
| + const GlobalFrameRoutingId kId(filter_->child_id(), 0);
|
| LoadInfoTestRequestInfo request_info[] = {
|
| - {kId.route_id,
|
| - GURL("test://1/"),
|
| - net::LOAD_STATE_SENDING_REQUEST,
|
| + {kId, GURL("test://1/"), net::LOAD_STATE_SENDING_REQUEST,
|
| net::UploadProgress(0, 0)},
|
| - {kId.route_id,
|
| - GURL("test://2/"),
|
| - net::LOAD_STATE_READING_RESPONSE,
|
| + {kId, GURL("test://2/"), net::LOAD_STATE_READING_RESPONSE,
|
| net::UploadProgress(0, 0)},
|
| - {kId.route_id,
|
| - GURL("test://3/"),
|
| - net::LOAD_STATE_SENDING_REQUEST,
|
| + {kId, GURL("test://3/"), net::LOAD_STATE_SENDING_REQUEST,
|
| net::UploadProgress(0, 0)},
|
| };
|
| std::unique_ptr<LoadInfoMap> load_info_map =
|
| @@ -3629,16 +3625,10 @@ TEST_P(ResourceDispatcherHostTest, LoadInfo) {
|
| // Tests GetLoadInfoForAllRoutes when there are 2 requests with the same
|
| // priority. The first one (Which will have the lowest ID) should be returned.
|
| TEST_P(ResourceDispatcherHostTest, LoadInfoSamePriority) {
|
| - const GlobalRoutingID kId(filter_->child_id(), 0);
|
| + const GlobalFrameRoutingId kId(filter_->child_id(), 0);
|
| LoadInfoTestRequestInfo request_info[] = {
|
| - {kId.route_id,
|
| - GURL("test://1/"),
|
| - net::LOAD_STATE_IDLE,
|
| - net::UploadProgress(0, 0)},
|
| - {kId.route_id,
|
| - GURL("test://2/"),
|
| - net::LOAD_STATE_IDLE,
|
| - net::UploadProgress(0, 0)},
|
| + {kId, GURL("test://1/"), net::LOAD_STATE_IDLE, net::UploadProgress(0, 0)},
|
| + {kId, GURL("test://2/"), net::LOAD_STATE_IDLE, net::UploadProgress(0, 0)},
|
| };
|
| std::unique_ptr<LoadInfoMap> load_info_map =
|
| RunLoadInfoTest(request_info, arraysize(request_info));
|
| @@ -3652,27 +3642,17 @@ TEST_P(ResourceDispatcherHostTest, LoadInfoSamePriority) {
|
|
|
| // Tests GetLoadInfoForAllRoutes when a request is uploading a body.
|
| TEST_P(ResourceDispatcherHostTest, LoadInfoUploadProgress) {
|
| - const GlobalRoutingID kId(filter_->child_id(), 0);
|
| + const GlobalFrameRoutingId kId(filter_->child_id(), 0);
|
| LoadInfoTestRequestInfo request_info[] = {
|
| - {kId.route_id,
|
| - GURL("test://1/"),
|
| - net::LOAD_STATE_READING_RESPONSE,
|
| + {kId, GURL("test://1/"), net::LOAD_STATE_READING_RESPONSE,
|
| net::UploadProgress(0, 0)},
|
| - {kId.route_id,
|
| - GURL("test://1/"),
|
| - net::LOAD_STATE_READING_RESPONSE,
|
| + {kId, GURL("test://1/"), net::LOAD_STATE_READING_RESPONSE,
|
| net::UploadProgress(1000, 1000)},
|
| - {kId.route_id,
|
| - GURL("test://2/"),
|
| - net::LOAD_STATE_SENDING_REQUEST,
|
| + {kId, GURL("test://2/"), net::LOAD_STATE_SENDING_REQUEST,
|
| net::UploadProgress(50, 100)},
|
| - {kId.route_id,
|
| - GURL("test://1/"),
|
| - net::LOAD_STATE_READING_RESPONSE,
|
| + {kId, GURL("test://1/"), net::LOAD_STATE_READING_RESPONSE,
|
| net::UploadProgress(1000, 1000)},
|
| - {kId.route_id,
|
| - GURL("test://3/"),
|
| - net::LOAD_STATE_READING_RESPONSE,
|
| + {kId, GURL("test://3/"), net::LOAD_STATE_READING_RESPONSE,
|
| net::UploadProgress(0, 0)},
|
| };
|
| std::unique_ptr<LoadInfoMap> load_info_map =
|
| @@ -3690,24 +3670,16 @@ TEST_P(ResourceDispatcherHostTest, LoadInfoUploadProgress) {
|
| // RenderViews. Also tests the case where the first / last requests are the
|
| // most interesting ones.
|
| TEST_P(ResourceDispatcherHostTest, LoadInfoTwoRenderViews) {
|
| - const GlobalRoutingID kId1(filter_->child_id(), 0);
|
| - const GlobalRoutingID kId2(filter_->child_id(), 1);
|
| + const GlobalFrameRoutingId kId1(filter_->child_id(), 0);
|
| + const GlobalFrameRoutingId kId2(filter_->child_id(), 1);
|
| LoadInfoTestRequestInfo request_info[] = {
|
| - {kId1.route_id,
|
| - GURL("test://1/"),
|
| - net::LOAD_STATE_CONNECTING,
|
| + {kId1, GURL("test://1/"), net::LOAD_STATE_CONNECTING,
|
| net::UploadProgress(0, 0)},
|
| - {kId2.route_id,
|
| - GURL("test://2/"),
|
| - net::LOAD_STATE_IDLE,
|
| + {kId2, GURL("test://2/"), net::LOAD_STATE_IDLE,
|
| net::UploadProgress(0, 0)},
|
| - {kId1.route_id,
|
| - GURL("test://3/"),
|
| - net::LOAD_STATE_IDLE,
|
| + {kId1, GURL("test://3/"), net::LOAD_STATE_IDLE,
|
| net::UploadProgress(0, 0)},
|
| - {kId2.route_id,
|
| - GURL("test://4/"),
|
| - net::LOAD_STATE_CONNECTING,
|
| + {kId2, GURL("test://4/"), net::LOAD_STATE_CONNECTING,
|
| net::UploadProgress(0, 0)},
|
| };
|
| std::unique_ptr<LoadInfoMap> load_info_map =
|
|
|