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

Unified Diff: content/browser/renderer_host/render_view_host_unittest.cc

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Charlie's comments Created 6 years, 10 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/renderer_host/render_view_host_unittest.cc
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index 73060c36dd3e716cfa613073aad3230e33d2fbb7..f2f1d9750a2ecef5039f33bf5cb9b62d13ae5edb 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -72,10 +72,9 @@ TEST_F(RenderViewHostTest, CreateFullscreenWidget) {
test_rvh()->CreateNewFullscreenWidget(routing_id);
}
-// Makes sure that RenderViewHost::is_waiting_for_unload_ack_ is false when
-// reloading a page. If is_waiting_for_unload_ack_ is not false when reloading
-// the contents may get closed out even though the user pressed the reload
-// button.
+// Makes sure that the RenderViewHost is not waiting for an unload ack when
+// reloading a page. If this is not the case, when reloading, the contents may
+// get closed out even though the user pressed the reload button.
TEST_F(RenderViewHostTest, ResetUnloadOnReload) {
const GURL url1("http://foo1");
const GURL url2("http://foo2");
@@ -85,12 +84,11 @@ TEST_F(RenderViewHostTest, ResetUnloadOnReload) {
// . go to a page.
// . go to a new page, preferably one that takes a while to resolve, such
// as one on a site that doesn't exist.
- // . After this step is_waiting_for_unload_ack_ has been set to true on
- // the first RVH.
+ // . After this step IsWaitingForUnloadACK returns true on the first RVH.
// . click stop before the page has been commited.
// . click reload.
- // . is_waiting_for_unload_ack_ is still true, and the if the hang monitor
- // fires the contents gets closed.
+ // . IsWaitingForUnloadACK still returns true, and if the hang monitor fires
+ // the contents gets closed.
NavigateAndCommit(url1);
controller().LoadURL(
@@ -101,7 +99,7 @@ TEST_F(RenderViewHostTest, ResetUnloadOnReload) {
test_rvh()->SendShouldCloseACK(true);
contents()->Stop();
controller().Reload(false);
- EXPECT_FALSE(test_rvh()->is_waiting_for_unload_ack());
+ EXPECT_FALSE(test_rvh()->IsWaitingForUnloadACK());
}
// Ensure we do not grant bindings to a process shared with unprivileged views.
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698