projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git]
/
src
/
third_party
/
WebKit
/
LayoutTests
/
inspector
/
profiler
/
heap-snapshot-test.js
diff --git
a/src/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
b/src/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
index
646c8d5
..
791ccf0
100644
(file)
--- a/
src/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
+++ b/
src/third_party/WebKit/LayoutTests/inspector/profiler/heap-snapshot-test.js
@@
-433,13
+433,16
@@
InspectorTest.completeProfilerTest = function()
InspectorTest.runHeapSnapshotTestSuite = function(testSuite)
{
InspectorTest.runHeapSnapshotTestSuite = function(testSuite)
{
- InspectorTest._nextUid = 1;
var testSuiteTests = testSuite.slice();
var testSuiteTests = testSuite.slice();
+ var completeTestStack;
function runner()
{
if (!testSuiteTests.length) {
function runner()
{
if (!testSuiteTests.length) {
+ if (completeTestStack)
+ InspectorTest.addResult("FAIL: test already completed at " + completeTestStack);
InspectorTest.completeProfilerTest();
InspectorTest.completeProfilerTest();
+ completeTestStack = new Error().stack;
return;
}
return;
}
@@
-691,22
+694,22
@@
InspectorTest.switchToView = function(title, callback)
InspectorTest.takeAndOpenSnapshot = function(generator, callback)
{
callback = InspectorTest.safeWrap(callback);
InspectorTest.takeAndOpenSnapshot = function(generator, callback)
{
callback = InspectorTest.safeWrap(callback);
- var uid = InspectorTest._nextUid++;
var snapshot = generator();
var snapshot = generator();
- var profileType = WebInspector.panels.profiles.getProfileType(WebInspector.HeapSnapshotProfileType.TypeId);
- var profile = new WebInspector.HeapProfileHeader(profileType, "Mock snapshot #" + uid, uid);
- function pushGeneratedSnapshot(uid, callback)
+ var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapshotProfileType;
+ function pushGeneratedSnapshot(reportProgress, callback)
{
{
+ var profile = profileType.profileBeingRecorded();
+ if (reportProgress) {
+ profileType.reportHeapSnapshotProgress(50, 100, false);
+ profileType.reportHeapSnapshotProgress(100, 100, true);
+ }
snapshot.snapshot.typeId = "HEAP";
snapshot.snapshot.typeId = "HEAP";
- snapshot.snapshot.title = profile.title;
- snapshot.snapshot.uid = profile.uid;
- profileType.addHeapSnapshotChunk(uid, JSON.stringify(snapshot));
+ profileType.addHeapSnapshotChunk(JSON.stringify(snapshot));
setTimeout(callback, 0);
}
setTimeout(callback, 0);
}
- InspectorTest.override(HeapProfilerAgent, "
get
HeapSnapshot", pushGeneratedSnapshot);
+ InspectorTest.override(HeapProfilerAgent, "
take
HeapSnapshot", pushGeneratedSnapshot);
InspectorTest._takeAndOpenSnapshotCallback = callback;
InspectorTest._takeAndOpenSnapshotCallback = callback;
- profileType.addProfile(profile);
- WebInspector.panels.profiles._showProfile(profile);
+ profileType._takeHeapSnapshot(function() { });
};
InspectorTest.viewColumns = function()
};
InspectorTest.viewColumns = function()