Make invalid WebUI requests fail before HeadersComplete

Current behavior is to call NotifyHeadersComplete, which
makes the request succeed. It only fails later while
delivering the data (which is nullptr already).

This has a side-effect: navigation to such an invalid url is
treated as a success on the browser side, which is different
from regular urls. Fixing it in turn exposed two bugs:

- UrlDataManagerBackendTest used non-existing resource, which
  now results in a navigation failure. Changed it to use an existing
  resource.
- Android WebView was not able to fetch safe_browsing_ui resources
  because of the missing GetDataResourceBytes implementation.
  Existing tests tried to navigate to these resources and navigation
  succeeded, while the resource itself was not available and
  loading failed later in the pipeline. Added the missing function
  to AwContentClient.

Bug: 855189
Change-Id: I078794601a4fef09e835fddd8a1a2f903a34a8d9
Reviewed-on: https://chromium-review.googlesource.com/c/1364223
Reviewed-by: Dan Beam <dbeam@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615366}
5 files changed