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

Unified Diff: third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js

Issue 2850333002: DevTools: Promisify Profiler and HeapProfiler domains (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js b/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
index 9eabb78f987f9ec84267b762c17a12152371819c..3c596ebe3211a1d4b37168eb845e91c99f6ce7a3 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
@@ -687,18 +687,18 @@ InspectorTest.takeAndOpenSnapshot = function(generator, callback)
callback = InspectorTest.safeWrap(callback);
var snapshot = generator();
var profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotProfileType;
- function pushGeneratedSnapshot(reportProgress, callback2)
+ function pushGeneratedSnapshot(request)
{
var profile = profileType.profileBeingRecorded();
- if (reportProgress) {
+ if (request.reportProgress) {
profileType._reportHeapSnapshotProgress({data: {done: 50, total: 100, finished: false}});
profileType._reportHeapSnapshotProgress({data: {done: 100, total: 100, finished: true}});
}
snapshot.snapshot.typeId = "HEAP";
profileType._addHeapSnapshotChunk({data: JSON.stringify(snapshot)});
- return Promise.resolve(callback2(null));
+ return Promise.resolve({});
}
- InspectorTest.override(InspectorTest.HeapProfilerAgent, "takeHeapSnapshot", pushGeneratedSnapshot);
+ InspectorTest.override(InspectorTest.HeapProfilerAgent, "invoke_takeHeapSnapshot", pushGeneratedSnapshot);
InspectorTest._takeAndOpenSnapshotCallback = callback;
profileType._takeHeapSnapshot(function() { });
};

Powered by Google App Engine
This is Rietveld 408576698