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

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts Created 7 years, 6 months 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
Index: content/browser/web_contents/web_contents_impl_unittest.cc
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index 3d5dbeda66ecd7cc4cf5f4b54d38d44c3421a9a1..4215b9c0f0d20e4e3b10f3e7e4d2f055d50a197a 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -12,6 +12,7 @@
#include "content/browser/web_contents/navigation_entry_impl.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/global_request_id.h"
#include "content/public/browser/interstitial_page_delegate.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_details.h"
@@ -707,10 +708,8 @@ TEST_F(WebContentsImplTest, CrossSiteUnloadHandlers) {
contents()->GetPendingRenderViewHost());
// We won't hear DidNavigate until the onunload handler has finished running.
- // (No way to simulate that here, but it involves a call from RDH to
- // WebContentsImpl::OnCrossSiteResponse.)
- // DidNavigate from the pending page
+ // DidNavigate from the pending page.
contents()->TestDidNavigate(
pending_rvh, 1, url2, PAGE_TRANSITION_TYPED);
SiteInstance* instance2 = contents()->GetSiteInstance();
@@ -956,7 +955,7 @@ TEST_F(WebContentsImplTest, CrossSiteCantPreemptAfterUnload) {
// Simulate the pending renderer's response, which leads to an unload request
// being sent to orig_rvh.
- contents()->GetRenderManagerForTesting()->OnCrossSiteResponse(0, 0);
+ contents()->OnCrossSiteResponse(pending_rvh, GlobalRequestID(0, 0));
// Suppose the original renderer navigates now, while the unload request is in
// flight. We should ignore it, wait for the unload ack, and let the pending

Powered by Google App Engine
This is Rietveld 408576698