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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1874923002: Fix flakiness when disabling swap out timer in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 978e63eaa65330e078a65d78ad489b8784c7d05b..2e15af5003b03501c2f2eb8fd6a045122662309a 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -4095,16 +4095,8 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// delay the SwapOut ACK from the A->B navigation, so that the second B->A
// navigation is initiated before the first page receives the SwapOut ACK.
// Ensure that the RVH(A) that's pending deletion is not reused in that case.
-// crbug.com/554825
-#if defined(THREAD_SANITIZER)
-#define MAYBE_RenderViewHostPendingDeletionIsNotReused \
- DISABLED_RenderViewHostPendingDeletionIsNotReused
-#else
-#define MAYBE_RenderViewHostPendingDeletionIsNotReused \
- RenderViewHostPendingDeletionIsNotReused
-#endif
IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
- MAYBE_RenderViewHostPendingDeletionIsNotReused) {
+ RenderViewHostPendingDeletionIsNotReused) {
GURL a_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
NavigateToURL(shell(), a_url);
@@ -4121,6 +4113,7 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// process.
scoped_refptr<SwapoutACKMessageFilter> filter = new SwapoutACKMessageFilter();
rfh->GetProcess()->AddFilter(filter.get());
+ rfh->DisableSwapOutTimerForTesting();
// Navigate to B. This must wait for DidCommitProvisionalLoad, as opposed to
// DidStopLoading, since otherwise the SwapOut timer might call OnSwappedOut
@@ -4130,7 +4123,6 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
shell()->LoadURL(b_url);
commit_observer.WaitForCommit();
EXPECT_FALSE(deleted_observer.deleted());
- rfh->ResetSwapOutTimerForTesting();
// Since the SwapOut ACK for A->B is dropped, the first page's
// RenderFrameHost and RenderViewHost should be pending deletion after the
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698