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

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: Rebase to get Android build fix 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d99a2f9abe6ba7c380881051f27edc8dea3e44d3..9ad83d365acadbfab7b83303909405af49572df4 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"
@@ -697,10 +698,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();
@@ -946,7 +945,8 @@ 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()->GetRenderManagerForTesting()->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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698