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

Unified Diff: third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-loader.html

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-loader.html
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-loader.html b/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-loader.html
index b07f7177fa4409ea851af456b2b00a409f6bc706..0bf44309a0f4ac48a66229b40c3ba78f2dc3a07e 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-loader.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-loader.html
@@ -17,15 +17,15 @@ function test()
var profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotProfileType;
- InspectorTest.override(InspectorTest.HeapProfilerAgent, "takeHeapSnapshot", takeHeapSnapshotMock);
- function takeHeapSnapshotMock(reportProgress, callback) {
- if (reportProgress) {
+ InspectorTest.override(InspectorTest.HeapProfilerAgent, "invoke_takeHeapSnapshot", takeHeapSnapshotMock);
+ function takeHeapSnapshotMock(request) {
+ if (request.reportProgress) {
profileType._reportHeapSnapshotProgress({data: {done: 50, total: 100, finished: false}});
profileType._reportHeapSnapshotProgress({data: {done: 100, total: 100, finished: true}});
}
for (var i = 0, l = sourceStringified.length; i < l; i += partSize)
dispatcher.addHeapSnapshotChunk(sourceStringified.slice(i, i + partSize));
- return Promise.resolve(callback(null));
+ return Promise.resolve({});
}
function tempFileReady()

Powered by Google App Engine
This is Rietveld 408576698