Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / timeline / timeline-window-filter.html
index 7e33f8f..ce33cea 100644 (file)
@@ -25,7 +25,7 @@ function test()
     model.loadFromFile({}, new WebInspector.Progress());
     timeline._currentViews[0]._refresh();
 
-    overviewPane._update();
+    overviewPane.update();
     InspectorTest.addResult("OverviewPane:");
     dumpDividers(overviewPane._overviewCalculator);
     InspectorTest.addResult("");
@@ -35,7 +35,7 @@ function test()
         var view = timeline._currentViews[0];
         overviewPane._overviewGrid.setWindow(windowLeft, windowRight);
         view._refresh();
-        InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get());
+        InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
         InspectorTest.addResult("range = " + windowLeft + " - " + windowRight);
         InspectorTest.addResult("time range = " + view._windowStartTime + " - " + view._windowEndTime);
         InspectorTest.addResult("records count: " + view._presentationModel.filteredRecords().length);
@@ -48,7 +48,7 @@ function test()
         var mainView = timeline._currentViews[0]._mainView;
         overviewPane._overviewGrid.setWindow(windowLeft, windowRight);
         mainView.update();
-        InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get());
+        InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
         InspectorTest.addResult("range = " + windowLeft + " - " + windowRight);
         InspectorTest.addResult("time range = " + mainView._timeWindowLeft + " - " + mainView._timeWindowRight);
         dumpDividers(mainView._calculator);
@@ -63,22 +63,21 @@ function test()
         InspectorTest.addResult("divider offsets: [" + dividers.join(", ") + "]. We are expecting round numbers.");
     }
 
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.Events);
+    timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Events);
+    timeline._onModeChanged();
     dumpRecordsCountForRange(0, 1);
     dumpRecordsCountForRange(0.25, 0.75);
     dumpRecordsCountForRange(0.33, 0.66);
 
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.Memory);
+    timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
+    timeline._onModeChanged();
     dumpRecordsCountForRange(0, 1);
     dumpRecordsCountForRange(0.25, 0.75);
     dumpRecordsCountForRange(0.33, 0.66);
 
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.Frames);
-    dumpRecordsCountForRange(0, 1);
-    dumpRecordsCountForRange(0.25, 0.75);
-    dumpRecordsCountForRange(0.33, 0.66);
-
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.FlameChart);
+    timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
+    timeline._flameChartEnabledSetting.set(true);
+    timeline._onModeChanged();
     dumpFlameChartRecordsCountForRange(0, 1);
     dumpFlameChartRecordsCountForRange(0.25, 0.5);
     dumpFlameChartRecordsCountForRange(0.33, 0.4);
@@ -86,24 +85,25 @@ function test()
     overviewPane._overviewGrid.setWindow(0.1, 0.9);
 
     InspectorTest.addResult("--------------------------------------------------------");
-    InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get());
+    InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
     InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.Events);
-    InspectorTest.addResult("");
 
-    InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get());
-    InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.Memory);
+    timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Events);
+    timeline._flameChartEnabledSetting.set(false);
+    timeline._onModeChanged();
     InspectorTest.addResult("");
 
-    InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get());
+    InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
     InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.Frames);
+    timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
+    timeline._onModeChanged();
     InspectorTest.addResult("");
 
-    InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get());
+    InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
     InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
-    timeline._onModeChanged(WebInspector.TimelinePanel.Mode.FlameChart);
+    timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
+    timeline._flameChartEnabledSetting.set(true);
+    timeline._onModeChanged();
 
     InspectorTest.completeTest();
 }