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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
OLDNEW
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 Bindings.TempFile = InspectorTest.TempFileMock;
5 5
6 InspectorTest.startProfilerTest = function(callback) 6 InspectorTest.startProfilerTest = function(callback)
7 { 7 {
8 InspectorTest.addResult("Profiler was enabled."); 8 InspectorTest.addResult("Profiler was enabled.");
9 InspectorTest.addSniffer(WebInspector.panels.profiles, "_addProfileHeader", InspectorTest._profileHeaderAdded, true); 9 InspectorTest.addSniffer(UI.panels.profiles, "_addProfileHeader", InspectorT est._profileHeaderAdded, true);
10 InspectorTest.addSniffer(WebInspector.ProfileView.prototype, "refresh", Insp ectorTest._profileViewRefresh, true); 10 InspectorTest.addSniffer(Profiler.ProfileView.prototype, "refresh", Inspecto rTest._profileViewRefresh, true);
11 InspectorTest.safeWrap(callback)(); 11 InspectorTest.safeWrap(callback)();
12 }; 12 };
13 13
14 InspectorTest.completeProfilerTest = function() 14 InspectorTest.completeProfilerTest = function()
15 { 15 {
16 InspectorTest.addResult(""); 16 InspectorTest.addResult("");
17 InspectorTest.addResult("Profiler was disabled."); 17 InspectorTest.addResult("Profiler was disabled.");
18 InspectorTest.completeTest(); 18 InspectorTest.completeTest();
19 }; 19 };
20 20
(...skipping 18 matching lines...) Expand all
39 }; 39 };
40 40
41 InspectorTest.showProfileWhenAdded = function(title) 41 InspectorTest.showProfileWhenAdded = function(title)
42 { 42 {
43 InspectorTest._showProfileWhenAdded = title; 43 InspectorTest._showProfileWhenAdded = title;
44 }; 44 };
45 45
46 InspectorTest._profileHeaderAdded = function(profile) 46 InspectorTest._profileHeaderAdded = function(profile)
47 { 47 {
48 if (InspectorTest._showProfileWhenAdded === profile.title) 48 if (InspectorTest._showProfileWhenAdded === profile.title)
49 WebInspector.panels.profiles.showProfile(profile); 49 UI.panels.profiles.showProfile(profile);
50 }; 50 };
51 51
52 InspectorTest.waitUntilProfileViewIsShown = function(title, callback) 52 InspectorTest.waitUntilProfileViewIsShown = function(title, callback)
53 { 53 {
54 callback = InspectorTest.safeWrap(callback); 54 callback = InspectorTest.safeWrap(callback);
55 55
56 var profilesPanel = WebInspector.panels.profiles; 56 var profilesPanel = UI.panels.profiles;
57 if (profilesPanel.visibleView && profilesPanel.visibleView.profile && profil esPanel.visibleView._profileHeader.title === title) 57 if (profilesPanel.visibleView && profilesPanel.visibleView.profile && profil esPanel.visibleView._profileHeader.title === title)
58 callback(profilesPanel.visibleView); 58 callback(profilesPanel.visibleView);
59 else 59 else
60 InspectorTest._waitUntilProfileViewIsShownCallback = { title: title, cal lback: callback }; 60 InspectorTest._waitUntilProfileViewIsShownCallback = { title: title, cal lback: callback };
61 } 61 }
62 62
63 InspectorTest._profileViewRefresh = function() 63 InspectorTest._profileViewRefresh = function()
64 { 64 {
65 // Called in the context of ProfileView. 65 // Called in the context of ProfileView.
66 if (InspectorTest._waitUntilProfileViewIsShownCallback && InspectorTest._wai tUntilProfileViewIsShownCallback.title === this._profileHeader.title) { 66 if (InspectorTest._waitUntilProfileViewIsShownCallback && InspectorTest._wai tUntilProfileViewIsShownCallback.title === this._profileHeader.title) {
67 var callback = InspectorTest._waitUntilProfileViewIsShownCallback; 67 var callback = InspectorTest._waitUntilProfileViewIsShownCallback;
68 delete InspectorTest._waitUntilProfileViewIsShownCallback; 68 delete InspectorTest._waitUntilProfileViewIsShownCallback;
69 callback.callback(this); 69 callback.callback(this);
70 } 70 }
71 }; 71 };
72 72
73 InspectorTest.startSamplingHeapProfiler = function() 73 InspectorTest.startSamplingHeapProfiler = function()
74 { 74 {
75 WebInspector.SamplingHeapProfileType.instance.startRecordingProfile(); 75 Profiler.SamplingHeapProfileType.instance.startRecordingProfile();
76 } 76 }
77 77
78 InspectorTest.stopSamplingHeapProfiler = function() 78 InspectorTest.stopSamplingHeapProfiler = function()
79 { 79 {
80 WebInspector.SamplingHeapProfileType.instance.stopRecordingProfile(); 80 Profiler.SamplingHeapProfileType.instance.stopRecordingProfile();
81 } 81 }
82 82
83 }; 83 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698