Bug 165683 - Web Inspector: Add tests for Fetch API Network Data (CORs, Opaque Responses, Filtered Headers)
Summary: Web Inspector: Add tests for Fetch API Network Data (CORs, Opaque Responses, ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on: 165230
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-09 14:11 PST by Joseph Pecoraro
Modified: 2016-12-12 19:32 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (10.67 KB, patch)
2016-12-09 19:23 PST, Joseph Pecoraro
bburg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2016-12-09 14:11:43 PST
Summary:
Add tests for Fetch API Network Data (CORs, Opaque Responses, Filtered Headers)

Fetch API has many modes, and can filter data from the JavaScript exposed Response data. However Web Inspector should always be able to see complete information about the Network requests.

This should already be the case, but we should add tests to verify that and make sure it doesn't regress!
Comment 1 Joseph Pecoraro 2016-12-09 19:23:32 PST
Created attachment 296769 [details]
[PATCH] Proposed Fix
Comment 2 Blaze Burg 2016-12-12 09:27:22 PST
Comment on attachment 296769 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=296769&action=review

r=me

> LayoutTests/http/tests/inspector/network/fetch-network-data.html:47
> +            InspectorTest.expectEqual(resource.responseHeaders["X-Custom-Header"], "Custom-Header-Value", "Should be able to see X-Custom-Header.");

This is pretty sweet.

> LayoutTests/http/tests/inspector/network/fetch-network-data.html:62
> +        name: "Network.Fetch.ModeCORs.SameOrigin",

Nit: it should always be 'CORS' as it is an acronym, unless it's 'cors' as in the literal value.

> LayoutTests/http/tests/inspector/network/fetch-network-data.html:100
> +                fetch("http://localhost:8000/inspector/network/resources/cors-data.pl", {mode: "same-origin"}).then(

Neat. Maybe we should start using this in inspector & tests for loading files, instead of XHR?
Comment 3 Joseph Pecoraro 2016-12-12 15:37:20 PST
<https://trac.webkit.org/changeset/209734>