Improve the timing of OnLoadEnd (fixes issue #3341)

Use WebContentsDelegate::DidFinishLoad instead of a custom Mojo message.
This fixes flaky OnLoadEnd behavior with NavigationTest.Order.
This commit is contained in:
Marshall Greenblatt
2022-08-25 18:17:51 -04:00
parent 5ec6e62656
commit 37aee4d3a0
12 changed files with 42 additions and 59 deletions

View File

@@ -92,6 +92,9 @@ class PdfViewerTestHandler : public TestHandler, public CefContextMenuHandler {
int httpStatusCode) override {
bool is_pdf1 = false;
const std::string& url = frame->GetURL();
if (url == "about:blank")
return;
if (url == kPdfHtmlUrl) {
if (!got_on_load_end_html_)
got_on_load_end_html_.yes();
@@ -107,7 +110,7 @@ class PdfViewerTestHandler : public TestHandler, public CefContextMenuHandler {
NOTREACHED();
}
} else {
NOTREACHED();
NOTREACHED() << "url=" << url;
}
if (is_pdf1) {