Changeset 76112 in webkit


Ignore:
Timestamp:
Jan 19, 2011 4:24:03 AM (13 years ago)
Author:
mnaganov@chromium.org
Message:

works in chromium

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/inspector/cpu-profiler-profiling.html

    r76111 r76112  
    55
    66function pageFunction() {
    7     console.profile();  // Make sure we capture the current callstack.
    8     console.profileEnd();
     7    console.profile("outer");
     8    console.profile("inner");  // [Chromium] Make sure we capture the current callstack.
     9    console.profileEnd("inner");
     10    console.profileEnd("outer");
    911}
    1012
     
    3436    }
    3537
     38    var oldAddProfileHeader = WebInspector.panels.profiles._addProfileHeader;
     39    WebInspector.panels.profiles._addProfileHeader = function(profile)
     40    {
     41        oldAddProfileHeader.call(this, profile);
     42        if (profile.title === "inner") {
     43            this.showProfile(profile);
     44        }
     45    }
     46
    3647    var oldRefresh = WebInspector.CPUProfileView.prototype.refresh;
    3748    WebInspector.CPUProfileView.prototype.refresh = function()
    3849    {
    3950        oldRefresh.call(this);
    40         InspectorTest.findPageFunctionProfileNode();       
     51        if (this.profile.title === "inner") {
     52            var tree = this.profileDataGridTree;
     53            if (!tree)
     54                 InspectorTest.addResult("no tree");
     55            var node = tree.children[0];
     56            if (!node)
     57                 InspectorTest.addResult("no node");
     58            while (node) {
     59                if (node.functionName.indexOf("pageFunction") !== -1) {
     60                    InspectorTest.addResult("found pageFunction");
     61                    break;
     62                }
     63                node = node.traverseNextNode(true, null, true);
     64            }
     65            InspectorTest.completeTest();
     66        }
    4167    }
    4268}
Note: See TracChangeset for help on using the changeset viewer.