Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: LayoutTests/inspector/profiler/profiler-test.js

Issue 235453008: DevTools: Extract CPU profile model out of CPUProfileView. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 var initialize_ProfilerTest = function() { 1 var initialize_ProfilerTest = function() {
2 2
3 InspectorTest.startProfilerTest = function(callback) 3 InspectorTest.startProfilerTest = function(callback)
4 { 4 {
5 WebInspector.inspectorView.showPanel("profiles"); 5 WebInspector.inspectorView.showPanel("profiles");
6 6
7 InspectorTest.addResult("Profiler was enabled."); 7 InspectorTest.addResult("Profiler was enabled.");
8 InspectorTest.addSniffer(WebInspector.panels.profiles, "_addProfileHeader", InspectorTest._profileHeaderAdded, true); 8 InspectorTest.addSniffer(WebInspector.panels.profiles, "_addProfileHeader", InspectorTest._profileHeaderAdded, true);
9 InspectorTest.addSniffer(WebInspector.CPUProfileView.prototype, "refresh", I nspectorTest._profileViewRefresh, true); 9 InspectorTest.addSniffer(WebInspector.CPUProfileView.prototype, "refresh", I nspectorTest._profileViewRefresh, true);
10 InspectorTest.safeWrap(callback)(); 10 InspectorTest.safeWrap(callback)();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 if (InspectorTest._showProfileWhenAdded === profile.title) 47 if (InspectorTest._showProfileWhenAdded === profile.title)
48 WebInspector.panels.profiles.showProfile(profile); 48 WebInspector.panels.profiles.showProfile(profile);
49 }; 49 };
50 50
51 InspectorTest.waitUntilProfileViewIsShown = function(title, callback) 51 InspectorTest.waitUntilProfileViewIsShown = function(title, callback)
52 { 52 {
53 callback = InspectorTest.safeWrap(callback); 53 callback = InspectorTest.safeWrap(callback);
54 54
55 var profilesPanel = WebInspector.panels.profiles; 55 var profilesPanel = WebInspector.panels.profiles;
56 if (profilesPanel.visibleView && profilesPanel.visibleView.profile && profil esPanel.visibleView.profile.title === title) 56 if (profilesPanel.visibleView && profilesPanel.visibleView.profile && profil esPanel.visibleView._profileHeader.title === title)
57 callback(profilesPanel.visibleView); 57 callback(profilesPanel.visibleView);
58 else 58 else
59 InspectorTest._waitUntilProfileViewIsShownCallback = { title: title, cal lback: callback }; 59 InspectorTest._waitUntilProfileViewIsShownCallback = { title: title, cal lback: callback };
60 } 60 }
61 61
62 InspectorTest._profileViewRefresh = function() 62 InspectorTest._profileViewRefresh = function()
63 { 63 {
64 // Called in the context of ProfileView. 64 // Called in the context of ProfileView.
65 if (InspectorTest._waitUntilProfileViewIsShownCallback && InspectorTest._wai tUntilProfileViewIsShownCallback.title === this.profile.title) { 65 if (InspectorTest._waitUntilProfileViewIsShownCallback && InspectorTest._wai tUntilProfileViewIsShownCallback.title === this._profileHeader.title) {
66 var callback = InspectorTest._waitUntilProfileViewIsShownCallback; 66 var callback = InspectorTest._waitUntilProfileViewIsShownCallback;
67 delete InspectorTest._waitUntilProfileViewIsShownCallback; 67 delete InspectorTest._waitUntilProfileViewIsShownCallback;
68 callback.callback(this); 68 callback.callback(this);
69 } 69 }
70 }; 70 };
71 71
72 }; 72 };
OLDNEW
« no previous file with comments | « LayoutTests/inspector/profiler/cpu-profiler-save-load.html ('k') | Source/devtools/front_end/CPUProfileView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698