Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / profiler / heap-snapshot-test.js
index d8dc648..d2b8a2b 100644 (file)
@@ -1,5 +1,7 @@
 var initialize_HeapSnapshotTest = function() {
 
+InspectorTest.preloadPanel("profiles");
+
 InspectorTest.createHeapSnapshotMockFactories = function() {
 
 InspectorTest.createJSHeapSnapshotMockObject = function()
@@ -85,7 +87,7 @@ InspectorTest.createHeapSnapshotMockRaw = function()
             1, 5, 6, 6,  6, 21, 0], // E (35)
         edges: [
             // root node edges
-            2,  6,  7, // shortcut 'a' to node 'A'
+            1,  6,  7, // property 'a' to node 'A'
             1,  7, 14, // property 'b' to node 'B'
 
             // A node edges
@@ -259,7 +261,8 @@ InspectorTest.HeapEdge.Type = {
     "property": "property",
     "internal": "internal",
     "hidden": "hidden",
-    "shortcut": "shortcut"
+    "shortcut": "shortcut",
+    "weak": "weak"
 };
 
 InspectorTest.HeapSnapshotBuilder = function()
@@ -411,7 +414,6 @@ InspectorTest.createHeapSnapshotMockFactories();
 
 InspectorTest.startProfilerTest = function(callback)
 {
-    WebInspector.inspectorView.showPanel("profiles");
     WebInspector.settings.showAdvancedHeapSnapshotProperties.set(true);
 
     InspectorTest.addResult("Profiler was enabled.");
@@ -687,7 +689,7 @@ InspectorTest.takeAndOpenSnapshot = function(generator, callback)
     callback = InspectorTest.safeWrap(callback);
     var snapshot = generator();
     var profileType =  WebInspector.ProfileTypeRegistry.instance.heapSnapshotProfileType;
-    function pushGeneratedSnapshot(reportProgress, callback)
+    function pushGeneratedSnapshot(reportProgress, callback2)
     {
         var profile = profileType.profileBeingRecorded();
         if (reportProgress) {
@@ -696,7 +698,7 @@ InspectorTest.takeAndOpenSnapshot = function(generator, callback)
         }
         snapshot.snapshot.typeId = "HEAP";
         profileType._addHeapSnapshotChunk({data: JSON.stringify(snapshot)});
-        setTimeout(callback, 0);
+        setTimeout(callback2, 0);
     }
     InspectorTest.override(HeapProfilerAgent, "takeHeapSnapshot", pushGeneratedSnapshot);
     InspectorTest._takeAndOpenSnapshotCallback = callback;