Bug 180506

Summary: ServiceWorker Inspector: Should be able to see image content from CacheStorage.add(url) network request
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix bburg: review+

Description Joseph Pecoraro 2017-12-06 14:09:11 PST
Should be able to see image content from CacheStorage.add(url) network request

Steps to Reproduce:
1. Inspect ServiceWorker on <https://mdn.github.io/sw-test/>
2. Show Network Tab
3. js> caches.open("v1").then((cache) => { cache.add("/sw-test/star-wars-logo.jpg") });
4. Select Network Table entry for star-wars-logo to show resource preview
  => Error message screen instead of image

Notes:
- Network.getResponseBody has no data
  - There is no CachedResource on the Worker
  - The data wasn't buffered in NetworkResourceData

Lets make the data buffer in NetworkResourceData for workers so we are guaranteed data.
Comment 1 Joseph Pecoraro 2017-12-06 14:11:32 PST
Created attachment 328626 [details]
[PATCH] Proposed Fix
Comment 2 BJ Burg 2017-12-08 14:40:57 PST
Comment on attachment 328626 [details]
[PATCH] Proposed Fix

r=me
Comment 3 Joseph Pecoraro 2017-12-08 14:58:06 PST
<https://trac.webkit.org/r225708>
Comment 4 Radar WebKit Bug Importer 2017-12-08 14:59:18 PST
<rdar://problem/35944628>