Changeset 92698 in webkit


Ignore:
Timestamp:
Aug 9, 2011 12:29:21 PM (13 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: XHRs end up in the resources panel.
https://bugs.webkit.org/show_bug.cgi?id=60321

Reviewed by Pavel Feldman.

Source/WebCore:

Test: http/tests/inspector/resource-tree/resource-tree-no-xhrs.html

  • inspector/front-end/ResourceTreeModel.js:

(WebInspector.ResourceTreeModel.prototype._onResourceUpdated):

  • inspector/front-end/ResourcesPanel.js:

(WebInspector.ResourcesPanel):

LayoutTests:

  • http/tests/inspector/console-xhr-logging-expected.txt:
  • http/tests/inspector/resource-tree/resource-tree-no-xhrs-expected.txt: Added.
  • http/tests/inspector/resource-tree/resource-tree-no-xhrs.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r92697 r92698  
     12011-08-09  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: XHRs end up in the resources panel.
     4        https://bugs.webkit.org/show_bug.cgi?id=60321
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * http/tests/inspector/console-xhr-logging-expected.txt:
     9        * http/tests/inspector/resource-tree/resource-tree-no-xhrs-expected.txt: Added.
     10        * http/tests/inspector/resource-tree/resource-tree-no-xhrs.html: Added.
     11
    1122011-08-08  Adrienne Walker  <enne@google.com>
    213
  • trunk/LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt

    r80832 r92698  
    1414XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-exists.html".
    1515console-xhr-logging.html:10sending a GET request to resources/xhr-does-not-exist.html
    16 xhr-does-not-exist.htmlGET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found)
     16resources/xhr-does-not-exist.htmlGET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found)
    1717XHR finished loading: "http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html".
    1818console-xhr-logging.html:10sending a POST request to resources/post-target.cgi
     
    2222console-xhr-logging.html:10sending a GET request to resources/xhr-exists.html
    2323console-xhr-logging.html:10sending a GET request to resources/xhr-does-not-exist.html
    24 xhr-does-not-exist.htmlGET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found)
     24resources/xhr-does-not-exist.htmlGET http://127.0.0.1:8000/inspector/resources/xhr-does-not-exist.html 404 (Not Found)
    2525console-xhr-logging.html:10sending a POST request to resources/post-target.cgi
    2626console-xhr-logging.html:10sending a GET request to http://localhost:8000/inspector/resources/xhr-exists.html
  • trunk/Source/WebCore/ChangeLog

    r92697 r92698  
     12011-08-09  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: XHRs end up in the resources panel.
     4        https://bugs.webkit.org/show_bug.cgi?id=60321
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Test: http/tests/inspector/resource-tree/resource-tree-no-xhrs.html
     9
     10        * inspector/front-end/ResourceTreeModel.js:
     11        (WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
     12        * inspector/front-end/ResourcesPanel.js:
     13        (WebInspector.ResourcesPanel):
     14
    1152011-08-08  Adrienne Walker  <enne@google.com>
    216
  • trunk/Source/WebCore/inspector/front-end/ResourceTreeModel.js

    r91839 r92698  
    195195        }
    196196
     197        if (resource.type === WebInspector.Resource.Type.XHR) {
     198            this._unbindResourceURL(resource);
     199            return;
     200        }
     201               
    197202        if (resource.finished)
    198203            this._addResourceToFrame(resource);
  • trunk/Source/WebCore/inspector/front-end/ResourcesPanel.js

    r92284 r92698  
    7878    this.registerShortcuts();
    7979
    80     WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceUpdated, this._refreshResource, this);
    81 
    8280    WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.OnLoad, this._onLoadEventFired, this);
    8381}
     
    262260    {
    263261        this._initDefaultSelection();
    264     },
    265 
    266     _refreshResource: function(event)
    267     {
    268         var resource = event.data;
    269         // FIXME: do not add XHR in the first place based on the native instrumentation.
    270         if (resource.type === WebInspector.Resource.Type.XHR) {
    271             var resourceTreeElement = this._findTreeElementForResource(resource);
    272             if (resourceTreeElement)
    273                 resourceTreeElement.parent.removeChild(resourceTreeElement);
    274         }
    275262    },
    276263
Note: See TracChangeset for help on using the changeset viewer.