chrome: Fix NavigationTest and ResourceRequestHandlerTest failures (see issue #2969)

This commit is contained in:
Marshall Greenblatt
2021-04-02 18:07:43 -04:00
parent 25701cfa6f
commit 09c6586480
3 changed files with 36 additions and 7 deletions

View File

@@ -105,6 +105,7 @@ void CefBrowserContentsDelegate::LoadingStateChanged(
if (auto c = client()) {
if (auto handler = c->GetLoadHandler()) {
auto navigation_lock = browser_info_->CreateNavigationLock();
handler->OnLoadingStateChange(browser(), is_loading, can_go_back,
can_go_forward);
}
@@ -507,6 +508,7 @@ void CefBrowserContentsDelegate::OnLoadEnd(CefRefPtr<CefFrame> frame,
int http_status_code) {
if (auto c = client()) {
if (auto handler = c->GetLoadHandler()) {
auto navigation_lock = browser_info_->CreateNavigationLock();
handler->OnLoadEnd(browser(), frame, http_status_code);
}
}
@@ -565,6 +567,7 @@ void CefBrowserContentsDelegate::OnLoadStart(
ui::PageTransition transition_type) {
if (auto c = client()) {
if (auto handler = c->GetLoadHandler()) {
auto navigation_lock = browser_info_->CreateNavigationLock();
// On the handler that loading has started.
handler->OnLoadStart(browser(), frame,
static_cast<cef_transition_type_t>(transition_type));