OLD | NEW |
1 var initialize_ProfilerTest = function() { | 1 var initialize_ProfilerTest = function() { |
2 | 2 |
3 InspectorTest.preloadPanel("profiles"); | 3 InspectorTest.preloadPanel("profiles"); |
| 4 WebInspector.TempFile = InspectorTest.TempFileMock; |
4 | 5 |
5 InspectorTest.startProfilerTest = function(callback) | 6 InspectorTest.startProfilerTest = function(callback) |
6 { | 7 { |
7 Runtime.experiments.enableForTest("disableAgentsWhenProfile"); | 8 Runtime.experiments.enableForTest("disableAgentsWhenProfile"); |
8 | 9 |
9 InspectorTest.addResult("Profiler was enabled."); | 10 InspectorTest.addResult("Profiler was enabled."); |
10 InspectorTest.addSniffer(WebInspector.panels.profiles, "_addProfileHeader",
InspectorTest._profileHeaderAdded, true); | 11 InspectorTest.addSniffer(WebInspector.panels.profiles, "_addProfileHeader",
InspectorTest._profileHeaderAdded, true); |
11 InspectorTest.addSniffer(WebInspector.CPUProfileView.prototype, "refresh", I
nspectorTest._profileViewRefresh, true); | 12 InspectorTest.addSniffer(WebInspector.CPUProfileView.prototype, "refresh", I
nspectorTest._profileViewRefresh, true); |
12 InspectorTest.safeWrap(callback)(); | 13 InspectorTest.safeWrap(callback)(); |
13 }; | 14 }; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 { | 66 { |
66 // Called in the context of ProfileView. | 67 // Called in the context of ProfileView. |
67 if (InspectorTest._waitUntilProfileViewIsShownCallback && InspectorTest._wai
tUntilProfileViewIsShownCallback.title === this._profileHeader.title) { | 68 if (InspectorTest._waitUntilProfileViewIsShownCallback && InspectorTest._wai
tUntilProfileViewIsShownCallback.title === this._profileHeader.title) { |
68 var callback = InspectorTest._waitUntilProfileViewIsShownCallback; | 69 var callback = InspectorTest._waitUntilProfileViewIsShownCallback; |
69 delete InspectorTest._waitUntilProfileViewIsShownCallback; | 70 delete InspectorTest._waitUntilProfileViewIsShownCallback; |
70 callback.callback(this); | 71 callback.callback(this); |
71 } | 72 } |
72 }; | 73 }; |
73 | 74 |
74 }; | 75 }; |
OLD | NEW |