Commit 88425402 authored by Sreeja Kamishetty's avatar Sreeja Kamishetty Committed by Commit Bot

Fix flaky RenderFrameHostImpl::CheckIsCurrentBeforeAndAfterUnload test

16 flake occurrences of this test have been detected.
List of all flake occurrences can be found at:
https://analysis.chromium.org/p/chromium/flake-portal/flakes/occurrences?key=ag9zfmZpbmRpdC1mb3ItbWVyagsSBUZsYWtlIl9jaHJvbWl1bUBjb250ZW50X2Jyb3dzZXJ0ZXN0c0BSZW5kZXJGcmFtZUhvc3RJbXBsQnJvd3NlclRlc3QuQ2hlY2tJc0N1cnJlbnRCZWZvcmVBbmRBZnRlclVubG9hZAw.

This CL fixes the test to avoid the flaky behaviour.

Bug: 1114149
Change-Id: I5d465964a2e80395da1fddf0d02d32489eaf840b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352035Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Commit-Queue: Sreeja Kamishetty <sreejakshetty@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798571}
parent 2fbc2519
......@@ -3609,7 +3609,6 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest, WebUiReloadAfterCrash) {
IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
CheckIsCurrentBeforeAndAfterUnload) {
IsolateAllSitesForTesting(base::CommandLine::ForCurrentProcess());
std::string onunload_script = "window.onunload = function(){ while(1);}";
GURL url_ab(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b)"));
GURL url_c(embedded_test_server()->GetURL("c.com", "/title1.html"));
......@@ -3638,11 +3637,6 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
EXPECT_FALSE(rfh_a->IsCurrent());
EXPECT_FALSE(rfh_b->IsCurrent());
EXPECT_TRUE(rfh_c->IsCurrent());
// 6) Resume deletion on rfh_b and run detach on rfh_b to delete its frame.
EXPECT_FALSE(delete_rfh_b.deleted());
rfh_b->DetachForTesting();
EXPECT_TRUE(delete_rfh_b.deleted());
}
// Test the LifecycleState is updated correctly for the main frame during
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment