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

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: Rebase + addressed some of Nasko's comments Created 6 years, 11 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.

Powered by Google App Engine
This is Rietveld 408576698