Commit 54c0b805 authored by jonross's avatar jonross Committed by Commit Bot

Update How WebViewTest.ReloadAfterCrash waits for frames

WebViewTest.ReloadAfterCrash wants to wait for frames to have been produced, but
is not interested in hit test data.

It has been using WaitForChildFrameSurfaceReady which does not work with
VizDisplayCompositor.

This updates it to using RenderFrameSubmissionObserver which works with both
classic compositing and Viz.

TEST=WebViewTest.ReloadAfterCrash

Bug: 787945
Change-Id: I1358b0780964cff0298f6e8851dd629bbd14dc44
Reviewed-on: https://chromium-review.googlesource.com/1076778Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562837}
parent 6b9b0c9c
...@@ -3624,7 +3624,8 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ReloadAfterCrash) { ...@@ -3624,7 +3624,8 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ReloadAfterCrash) {
// Load guest and wait for it to appear. // Load guest and wait for it to appear.
LoadAppWithGuest("web_view/simple"); LoadAppWithGuest("web_view/simple");
EXPECT_TRUE(GetGuestWebContents()->GetMainFrame()->GetView()); EXPECT_TRUE(GetGuestWebContents()->GetMainFrame()->GetView());
WaitForChildFrameSurfaceReady(GetGuestWebContents()->GetMainFrame()); content::RenderFrameSubmissionObserver frame_observer(GetGuestWebContents());
frame_observer.WaitForMetadataChange();
// Kill guest. // Kill guest.
auto* rph = GetGuestWebContents()->GetMainFrame()->GetProcess(); auto* rph = GetGuestWebContents()->GetMainFrame()->GetProcess();
...@@ -3640,11 +3641,8 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ReloadAfterCrash) { ...@@ -3640,11 +3641,8 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, ReloadAfterCrash) {
"document.querySelector('webview').reload()")); "document.querySelector('webview').reload()"));
load_observer.Wait(); load_observer.Wait();
EXPECT_TRUE(GetGuestWebContents()->GetMainFrame()->GetView()); EXPECT_TRUE(GetGuestWebContents()->GetMainFrame()->GetView());
// Ensure that the guest produces a new frame.
// When the frame passed has a RenderWidgetHostViewChildFrame, frame_observer.WaitForAnyFrameSubmission();
// WaitForChildFrameSurfaceReady will only return when the guest is embedded
// within the root surface.
WaitForChildFrameSurfaceReady(GetGuestWebContents()->GetMainFrame());
} }
// The presence of DomAutomationController interferes with these tests, so we // The presence of DomAutomationController interferes with these tests, so we
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
-PDFExtensionHitTestTest.MouseLeave* -PDFExtensionHitTestTest.MouseLeave*
-SitePerProcessDevToolsSanityTest.InputDispatchEventsToOOPIF -SitePerProcessDevToolsSanityTest.InputDispatchEventsToOOPIF
-WebViewTest.InterstitialPageFocusedWidget -WebViewTest.InterstitialPageFocusedWidget
-WebViewTest.ReloadAfterCrash
-WebViewGuestTouchFocusBrowserPluginSpecificTest.TouchFocusesBrowserPluginInEmbedder -WebViewGuestTouchFocusBrowserPluginSpecificTest.TouchFocusesBrowserPluginInEmbedder
# Mac Flaking with missing browser. https://crbug.com/842664 # Mac Flaking with missing browser. https://crbug.com/842664
......
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