Commit 7cada88c authored by Yi Gu's avatar Yi Gu Committed by Commit Bot

[VizHitTesting] Deflake SitePerProcessHitTestBrowserTest.ScrolledNestedPopupMenuTest

Similar to crrev.com/c/1298478, this patch adds a waiter to make sure
the previous RenderProcessHost get destroyed.

Tested with the trick mentioned in crrev.com/c/1299976 which could cause
consistent failures without the fix.

Bug: 889002
Change-Id: Id142ab917038e0a13eb676887525738ea08e3876
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754787Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687318}
parent 7d7d488c
......@@ -5613,10 +5613,9 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessHitTestBrowserTest,
// On Mac and Android, the reported menu coordinates are relative to the
// OOPIF, and its screen position is computed later, so this test isn't
// relevant on those platforms.
// TODO(crbug.com/889002): This test is flaky.
#if !defined(OS_ANDROID) && !defined(OS_MACOSX)
IN_PROC_BROWSER_TEST_P(SitePerProcessHitTestBrowserTest,
DISABLED_ScrolledNestedPopupMenuTest) {
ScrolledNestedPopupMenuTest) {
GURL main_url(embedded_test_server()->GetURL(
"a.com", "/frame_tree/page_with_tall_positioned_frame.html"));
EXPECT_TRUE(NavigateToURL(shell(), main_url));
......@@ -5630,10 +5629,18 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessHitTestBrowserTest,
FrameTreeNode* grandchild_node = child_node->child_at(0);
RenderProcessHost* rph = grandchild_node->current_frame_host()->GetProcess();
RenderProcessHostWatcher watcher(
rph, RenderProcessHostWatcher::WATCH_FOR_HOST_DESTRUCTION);
GURL grandchild_url(embedded_test_server()->GetURL(
"c.com", "/site_isolation/page-with-select.html"));
NavigateFrameToURL(grandchild_node, grandchild_url);
// This is to make sure that the navigation is completed and the previous
// RenderProcessHost is destroyed.
watcher.Wait();
WaitForHitTestData(grandchild_node->current_frame_host());
EXPECT_EQ(
......
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