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

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

Issue 98273008: [DevTools] Send heap snapshot to the frontend immediatly when it is ready (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test crash Created 6 years, 11 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: LayoutTests/inspector/profiler/heap-snapshot-loader.html
diff --git a/LayoutTests/inspector/profiler/heap-snapshot-loader.html b/LayoutTests/inspector/profiler/heap-snapshot-loader.html
index cab1103b14d872bf77e9e308f0b60ca9957042b9..d8fcf6251dab27e0be7b0604be96b50700b523d7 100644
--- a/LayoutTests/inspector/profiler/heap-snapshot-loader.html
+++ b/LayoutTests/inspector/profiler/heap-snapshot-loader.html
@@ -18,10 +18,14 @@ function test()
var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapshotProfileType;
- InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock);
- function getHeapSnapshotMock(uid, callback) {
+ InspectorTest.override(HeapProfilerAgent, "takeHeapSnapshot", takeHeapSnapshotMock);
+ function takeHeapSnapshotMock(reportProgress, callback) {
+ if (reportProgress) {
+ profileType.reportHeapSnapshotProgress(50, 100, false);
+ profileType.reportHeapSnapshotProgress(100, 100, true);
+ }
for (var i = 0, l = sourceStringified.length; i < l; i += partSize)
- dispatcher.addHeapSnapshotChunk(uid, sourceStringified.slice(i, i + partSize));
+ dispatcher.addHeapSnapshotChunk(-1, sourceStringified.slice(i, i + partSize));
setTimeout(callback, 0);
}
@@ -30,14 +34,7 @@ function test()
callback(this);
}
InspectorTest.addSniffer(WebInspector.HeapProfileHeader.prototype, "_didWriteToTempFile", tempFileReady);
- profileType._profileBeingRecorded = new WebInspector.HeapProfileHeader(profileType, "Snapshotting");
- profileType.addProfile(profileType._profileBeingRecorded);
-
- dispatcher.addProfileHeader({
- typeId: WebInspector.HeapSnapshotProfileType.TypeId,
- title: "heapSnapshotSaveToFileTest",
- uid: 42
- });
+ profileType._takeHeapSnapshot(function() {});
}
WebInspector.log = function(message) {

Powered by Google App Engine
This is Rietveld 408576698