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

Unified Diff: LayoutTests/inspector/timeline/timeline-window-filter.html

Issue 709423002: DevTools: remove old Timeline front-end implementation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated LayoutTests/inspector/layers/layer-canvas-log.html Created 6 years, 1 month 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/timeline/timeline-window-filter.html
diff --git a/LayoutTests/inspector/timeline/timeline-window-filter.html b/LayoutTests/inspector/timeline/timeline-window-filter.html
deleted file mode 100644
index 2fd9620bace14dbe1311f85f5b1af4625a84e587..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/timeline/timeline-window-filter.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<html>
-<head>
-<script src="../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../http/tests/inspector/timeline-test.js"></script>
-<script src="resources/timeline-data.js"></script>
-<script>
-
-function test()
-{
- var timelineData = InspectorTest.timelineData();
-
- var timeline = WebInspector.panels.timeline;
- var overviewPane = timeline._overviewPane;
- var model = timeline._model;
-
- function createFileReader(file, delegate)
- {
- return new InspectorTest.FakeFileReader(timelineData, delegate, model.saveToFile.bind(model));
- }
-
- InspectorTest.override(model, "_createFileReader", createFileReader);
-
- model.loadFromFile({}, new WebInspector.Progress());
- timeline._currentViews[0]._refresh();
-
- overviewPane.update();
- InspectorTest.addResult("OverviewPane:");
- overviewPane._overviewCalculator._setDisplayWindow(0, 450);
- dumpDividers(overviewPane._overviewCalculator);
- InspectorTest.addResult("");
-
- function dumpRecordsCountForRange(windowLeft, windowRight)
- {
- var view = timeline._currentViews[0];
- overviewPane._overviewGrid.setWindow(windowLeft, windowRight);
- view._refresh();
- 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);
- view._calculator.setDisplayWindow(5, 455 + WebInspector.TimelineCalculator._minWidth);
- dumpDividers(view._calculator);
- InspectorTest.addResult("");
- }
-
- function dumpFlameChartRecordsCountForRange(windowLeft, windowRight)
- {
- var mainView = timeline._currentViews[0]._mainView;
- overviewPane._overviewGrid.setWindow(windowLeft, windowRight);
- mainView.update();
- InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
- InspectorTest.addResult("range = " + windowLeft + " - " + windowRight);
- InspectorTest.addResult("time range = " + mainView._timeWindowLeft + " - " + mainView._timeWindowRight);
- mainView._calculator.setDisplayWindow(5, 455 + WebInspector.TimelineCalculator._minWidth);
- dumpDividers(mainView._calculator);
- InspectorTest.addResult("");
- }
-
- function dumpDividers(calculator)
- {
- var dividers = WebInspector.TimelineGrid.calculateDividerOffsets(calculator).offsets;
- for (var i = 0; i < dividers.length; ++i)
- dividers[i] -= calculator.zeroTime();
- InspectorTest.addResult("divider offsets: [" + dividers.join(", ") + "]. We are expecting round numbers.");
- }
-
- timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Events);
- timeline._onModeChanged();
- dumpRecordsCountForRange(0, 1);
- dumpRecordsCountForRange(0.25, 0.75);
- dumpRecordsCountForRange(0.33, 0.66);
-
- timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
- timeline._onModeChanged();
- dumpRecordsCountForRange(0, 1);
- dumpRecordsCountForRange(0.25, 0.75);
- dumpRecordsCountForRange(0.33, 0.66);
-
- timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
- timeline._flameChartEnabledSetting.set(true);
- timeline._onModeChanged();
- // FIXME(394762): uncomment once we support loading tracing events.
-// dumpFlameChartRecordsCountForRange(0, 1);
-// dumpFlameChartRecordsCountForRange(0.25, 0.5);
-// dumpFlameChartRecordsCountForRange(0.33, 0.4);
-
- overviewPane._overviewGrid.setWindow(0.1, 0.9);
-
- InspectorTest.addResult("--------------------------------------------------------");
- InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
- InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
-
- timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Events);
- timeline._flameChartEnabledSetting.set(false);
- timeline._onModeChanged();
- InspectorTest.addResult("");
-
- InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
- InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
- timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
- timeline._onModeChanged();
- InspectorTest.addResult("");
-
- InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get());
- InspectorTest.addResult("time range = " + timeline._windowStartTime + " - " + timeline._windowEndTime);
- timeline._overviewModeSetting.set(WebInspector.TimelinePanel.OverviewMode.Frames);
- timeline._flameChartEnabledSetting.set(true);
- timeline._onModeChanged();
-
- InspectorTest.completeTest();
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests the Timeline window filter.
-</p>
-
-<p>
-It applies different ranges to the OverviewGrid and expects that current view reflects the change.
-</p>
-<p>
-Also it detects that after switching to another view it gets the proper time range.
-</p>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698