Bug 62472

Summary: Web Inspector: WebInspector.mainResource points to old resource after inspected page reload
Product: WebKit Reporter: Andrey Kosyakov <caseq>
Component: Web Inspector (Deprecated)Assignee: Andrey Kosyakov <caseq>
Status: RESOLVED INVALID    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch eric: review-, gyuyoung.kim: commit-queue-

Description Andrey Kosyakov 2011-06-10 13:50:12 PDT
1. Navigate to http://www.webkit.org
2. Open inspector
3. Reload
4. Open inspector on inspector
5. Observe there's no network information in WebInspector.mainResource

The root cause is that when reloading, we bind new main resource first (upon resource start), then, upon frame navigation, clean up (new) main resource binding while removing older resource with the same URL, hence the following condition fails, as the binding is missing:

if (this.resourceForURL(frame.url))
    WebInspector.mainResource = this.resourceForURL(frame.url);
Comment 1 Andrey Kosyakov 2011-06-10 13:59:02 PDT
Created attachment 96780 [details]
patch
Comment 2 Gyuyoung Kim 2011-06-13 07:41:04 PDT
Comment on attachment 96780 [details]
patch

Attachment 96780 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/8831791
Comment 3 Eric Seidel (no email) 2011-06-13 14:55:06 PDT
Comment on attachment 96780 [details]
patch

How do we test this?
Comment 4 Brian Burg 2014-12-12 14:10:38 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.