Changeset 76112 in webkit
- Timestamp:
- Jan 19, 2011 4:24:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/inspector/cpu-profiler-profiling.html
r76111 r76112 5 5 6 6 function 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"); 9 11 } 10 12 … … 34 36 } 35 37 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 36 47 var oldRefresh = WebInspector.CPUProfileView.prototype.refresh; 37 48 WebInspector.CPUProfileView.prototype.refresh = function() 38 49 { 39 50 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 } 41 67 } 42 68 }
Note: See TracChangeset
for help on using the changeset viewer.