Enable <video> to see if a response from a service worker was cross-origin.

Previously, if the <video> src was same-origin as the page, and the
service worker intercepted the request and responded with an opaque
response (by making a cross-origin request without CORS sharing),
the <video> would be considered same-origin data.

The solution is to teach the data backing <video> about FetchResponseType,
which tells us if a response is opaque or non-opaque.

There is some complexity with multiple responses due to range requests/
partial content responses. It's possible that some responses are
opaque and some are non-opaque. Once the opaque bit is set, it shouldn't
be cleared.

This fixes tests added in:
https://chromium-review.googlesource.com/c/chromium/src/+/892683 and
https://chromium-review.googlesource.com/c/chromium/src/+/897165

Bug: 780435
Change-Id: I95f7f088d907f84edd4c2db8b57532e761237465
Reviewed-on: https://chromium-review.googlesource.com/828564
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Fredrik Hubinette <hubbe@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533942}
19 files changed