fixup tests

This commit is contained in:
Samuel Attard
2020-11-10 13:36:17 -08:00
parent 58d9c451c6
commit 28b794216d
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# CancellableNavigationEvent Object extends `Event`
* `returnValue` Object | null - Set this to cancel the navigation event and optionally return a custom error code or error page
* `returnValue` Object - Set this to cancel the navigation event and optionally return a custom error code or error page
* `errorCode` Number - Can be any error code from the [Net Error List](https://source.chromium.org/chromium/chromium/src/+/master:net/base/net_error_list.h). If you provide `errorPage` then this code can not be `-3`. We recommend using `-2` which is `net::Aborted`.
* `errorPage` String (optional) - Custom HTML error page to display when the navigation is cancelled.

View File

@@ -86,7 +86,7 @@ content::NavigationThrottle::ThrottleCheckResult
ElectronNavigationThrottle::WillStartRequest() {
auto* handle = navigation_handle();
if (handle->IsRendererInitiated() && handle->IsInMainFrame())
return DelegateEventToWebContents("-will-navigate", net::ERR_FAILED);
return DelegateEventToWebContents("-will-navigate", net::ERR_ABORTED);
return PROCEED;
}