Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2106)

Unified Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 2515823002: Remove WebContents::GetRoutingID(). (Closed)
Patch Set: add render_view_host.h include in resource_dispatcher_host_unittest.cc Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/host_zoom_map_impl_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37f3074473c1f4f5fed5b9a458a42c59b2accb23..43b45b849b705e3dd4fa6c649d6ba5e65b98d11d 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -43,6 +43,7 @@
#include "content/common/view_messages.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "content/public/browser/resource_request_info.h"
@@ -1199,8 +1200,8 @@ void ResourceDispatcherHostTest::
ResourceRequest request = CreateResourceRequest("GET", type, url);
request.origin_pid = web_contents_->GetRenderProcessHost()->GetID();
request.render_frame_id = web_contents_->GetMainFrame()->GetRoutingID();
- ResourceHostMsg_RequestResource msg(web_contents_->GetRoutingID(), request_id,
- request);
+ ResourceHostMsg_RequestResource msg(
+ web_contents_->GetRenderViewHost()->GetRoutingID(), request_id, request);
OnMessageReceived(msg, web_contents_filter_.get());
KickOffRequest();
}
@@ -1237,7 +1238,7 @@ void ResourceDispatcherHostTest::MakeWebContentsAssociatedDownloadRequest(
std::move(request), Referrer(), browser_context_->GetResourceContext(),
false, // is_content_initiated
web_contents_->GetRenderProcessHost()->GetID(),
- web_contents_->GetRoutingID(),
+ web_contents_->GetRenderViewHost()->GetRoutingID(),
web_contents_->GetMainFrame()->GetRoutingID(), false);
}
@@ -2765,7 +2766,8 @@ TEST_P(ResourceDispatcherHostTest, CancelRequestsForContextTransferred) {
EXPECT_EQ(1, host_.pending_requests());
// Cancelling by other methods shouldn't work either.
- host_.CancelRequestsForProcess(web_contents_->GetRoutingID());
+ host_.CancelRequestsForProcess(
+ web_contents_->GetRenderViewHost()->GetRoutingID());
EXPECT_EQ(1, host_.pending_requests());
// Cancelling by context should work.
« no previous file with comments | « content/browser/host_zoom_map_impl_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698