Bug 74935 - Web Inspector: determine the resource type in InspectorResourceAgent::willSendRequest
Summary: Web Inspector: determine the resource type in InspectorResourceAgent::willSen...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-12-20 08:29 PST by Timothy Hatcher
Modified: 2013-05-10 13:54 PDT (History)
7 users (show)

See Also:


Attachments
Facebook filtered by Other (119.36 KB, image/png)
2011-12-20 08:31 PST, Timothy Hatcher
no flags Details
Facebook filtered by XHR (117.24 KB, image/png)
2011-12-20 08:31 PST, Timothy Hatcher
no flags Details
WIP Change (6.10 KB, patch)
2012-02-14 11:19 PST, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (10.34 KB, patch)
2013-05-09 16:59 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion (514.89 KB, application/zip)
2013-05-10 00:08 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (601.07 KB, application/zip)
2013-05-10 00:38 PDT, Build Bot
no flags Details
Patch (7.33 KB, patch)
2013-05-10 08:23 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2011-12-20 08:29:43 PST
Right now the type is sent in InspectorResourceAgent::didReceiveResponse. But the type is known for most loads in InspectorResourceAgent::willSendRequest because the cached CachedResource was created with the type before loading. Only XHRs, the document and favicons don't know their type, but those are easy to fix.

Passing this type along in requestWillBeSent to the front-end would let the Network panel group long polling XHRs in the XHR category instead of Other. So when you are filtering by XHR they will show up. Facebook is a good example of this. They have a long poll XHR that sits in Other for minutes, then once it loads moves to the XHR category and another one is started in Other. It would be great to see the pend and finished ones all under XHR.
Comment 1 Timothy Hatcher 2011-12-20 08:31:04 PST
Created attachment 120029 [details]
Facebook filtered by Other
Comment 2 Timothy Hatcher 2011-12-20 08:31:19 PST
Created attachment 120030 [details]
Facebook filtered by XHR
Comment 3 Timothy Hatcher 2012-02-14 11:19:53 PST
Created attachment 127002 [details]
WIP Change

Attaching WIP patch. This does not solve the problem on Facebook yet. We need to get told about XHRs sooner so we can set the type before willSendRequest.
Comment 4 Antoine Quint 2013-04-24 07:11:32 PDT
<rdar://problem/13726105>
Comment 5 Timothy Hatcher 2013-05-09 16:59:18 PDT
Created attachment 201303 [details]
Patch
Comment 6 Timothy Hatcher 2013-05-09 17:03:15 PDT
Comment on attachment 201303 [details]
Patch

We still send the type in didReceiveResponse, since it can change from Other to XHR still in some cases.
Comment 7 Build Bot 2013-05-10 00:08:41 PDT
Comment on attachment 201303 [details]
Patch

Attachment 201303 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/322076

New failing tests:
http/tests/inspector/network/network-disable-cache-memory.html
http/tests/inspector/resource-tree/resource-tree-non-unique-url.html
http/tests/inspector/network/network-cachedresources-with-same-urls.html
http/tests/inspector/network/network-disable-cache-xhrs.html
Comment 8 Build Bot 2013-05-10 00:08:42 PDT
Created attachment 201323 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 9 Build Bot 2013-05-10 00:38:21 PDT
Comment on attachment 201303 [details]
Patch

Attachment 201303 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/339314

New failing tests:
http/tests/inspector/network/network-disable-cache-memory.html
http/tests/inspector/resource-tree/resource-tree-non-unique-url.html
http/tests/inspector/network/network-disable-cache-xhrs.html
http/tests/inspector/network/network-cachedresources-with-same-urls.html
http/tests/security/cross-frame-access-put.html
Comment 10 Build Bot 2013-05-10 00:38:23 PDT
Created attachment 201324 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.2
Comment 11 Timothy Hatcher 2013-05-10 08:23:03 PDT
Created attachment 201347 [details]
Patch
Comment 12 Joseph Pecoraro 2013-05-10 13:13:07 PDT
Comment on attachment 201347 [details]
Patch

r=me
Comment 13 WebKit Commit Bot 2013-05-10 13:54:12 PDT
Comment on attachment 201347 [details]
Patch

Clearing flags on attachment: 201347

Committed r149905: <http://trac.webkit.org/changeset/149905>
Comment 14 WebKit Commit Bot 2013-05-10 13:54:14 PDT
All reviewed patches have been landed.  Closing bug.