Do not display error page for unsafe redirects to javascript URLs.

Chrome used to drop the navigation request when it encountered a redirect
to a javascript URL.

Now in Chrome M73/M74, Chrome started displaying an error page with the
net::ERR_UNSAFE_REDIRECT error instead. This started with CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1488152

It turns out in https://crbug.com/941653 that the Meta4 ClickOnce
launcher extension (260K users) was using this edge case to cancel
download and replace it by its build-in download manager. It redirects
the navigation to javascript:void() to avoid displaying an error page.

This revert part of this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1488152
without regressing:
https://crbug.com/935175

(CL authored by arthursonzogni@, with minor changes by creis@.)

Bug: 941653
Bug: 935175
Change-Id: Ic6cf06b7c878fac10d2be181ec621c328d1f0229
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526634
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641431}
4 files changed