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

Unified Diff: chrome/test/base/browser_with_test_window_test.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: Added unit tests 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: chrome/test/base/browser_with_test_window_test.cc
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index 0ec7d96e8acaaeaf0e4096b97d2679d1c1e34d6d..88e4f086d465e4bab09a28064ada303ca4a33466 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -133,9 +133,6 @@ void BrowserWithTestWindowTest::CommitPendingLoad(
RenderViewHost* test_rvh = pending_rvh ? pending_rvh : old_rvh;
RenderViewHostTester* test_rvh_tester = RenderViewHostTester::For(test_rvh);
- // Simulate a SwapOut_ACK before the navigation commits.
- if (pending_rvh)
- RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK();
// For new navigations, we need to send a larger page ID. For renavigations,
// we need to send the preexisting page ID. We can tell these apart because
@@ -153,6 +150,9 @@ void BrowserWithTestWindowTest::CommitPendingLoad(
controller->GetPendingEntry()->GetURL(),
controller->GetPendingEntry()->GetTransitionType());
}
+ // Simulate the SwapOut_ACK from the renderer.
nasko 2014/01/23 23:34:58 Why did this move?
clamy 2014/01/24 17:01:54 It was causing a problem with some tests in unit_t
+ if (pending_rvh)
+ RenderViewHostTester::For(old_rvh)->SimulateSwapOutACK();
}
void BrowserWithTestWindowTest::NavigateAndCommit(

Powered by Google App Engine
This is Rietveld 408576698