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

Side by Side Diff: LayoutTests/inspector/tracing/timeline-window-filter.html

Issue 1178563002: DevTools: Refactor network panel overview (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update test. Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/devtools.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script src="resources/timeline-data.js"></script> 5 <script src="resources/timeline-data.js"></script>
6 <script> 6 <script>
7 7
8 function test() 8 function test()
9 { 9 {
10 var timelineData = InspectorTest.timelineData(); 10 var timelineData = InspectorTest.timelineData();
11 11
12 var timeline = WebInspector.panels.timeline; 12 var timeline = WebInspector.panels.timeline;
13 var overviewPane = timeline._overviewPane; 13 var overviewPane = timeline._overviewPane;
14 var model = timeline._model; 14 var model = timeline._model;
15 InspectorTest.switchTimelineToWaterfallMode(); 15 InspectorTest.switchTimelineToWaterfallMode();
16 16
17 function createFileReader(file, delegate) 17 function createFileReader(file, delegate)
18 { 18 {
19 return new InspectorTest.FakeFileReader(timelineData, delegate, timeline ._saveToFile.bind(timeline)); 19 return new InspectorTest.FakeFileReader(timelineData, delegate, timeline ._saveToFile.bind(timeline));
20 } 20 }
21 21
22 InspectorTest.override(model, "_createFileReader", createFileReader); 22 InspectorTest.override(model, "_createFileReader", createFileReader);
23 23
24 model.loadFromFile({}, new WebInspector.Progress()); 24 model.loadFromFile({}, new WebInspector.Progress());
25 timeline._currentViews[0]._refresh(); 25 timeline._currentViews[0]._refresh();
26 26
27 overviewPane.update(); 27 overviewPane.update();
28 InspectorTest.addResult("OverviewPane:"); 28 InspectorTest.addResult("OverviewPane:");
29 overviewPane._overviewCalculator._setDisplayWindow(0, 450); 29 overviewPane._overviewCalculator.setDisplayWindow(450);
30 dumpDividers(overviewPane._overviewCalculator); 30 dumpDividers(overviewPane._overviewCalculator);
31 InspectorTest.addResult(""); 31 InspectorTest.addResult("");
32 32
33 function dumpRecordsCountForRange(windowLeft, windowRight) 33 function dumpRecordsCountForRange(windowLeft, windowRight)
34 { 34 {
35 var view = timeline._currentViews[0]; 35 var view = timeline._currentViews[0];
36 overviewPane._overviewGrid.setWindow(windowLeft, windowRight); 36 overviewPane._overviewGrid.setWindow(windowLeft, windowRight);
37 view._refresh(); 37 view._refresh();
38 InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get()) ; 38 InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get()) ;
39 InspectorTest.addResult("range = " + windowLeft + " - " + windowRight); 39 InspectorTest.addResult("range = " + windowLeft + " - " + windowRight);
40 InspectorTest.addResult("time range = " + view._windowStartTime + " - " + view._windowEndTime); 40 InspectorTest.addResult("time range = " + view._windowStartTime + " - " + view._windowEndTime);
41 InspectorTest.addResult("records count: " + view._presentationModel.filt eredRecords().length); 41 InspectorTest.addResult("records count: " + view._presentationModel.filt eredRecords().length);
42 view._calculator.setDisplayWindow(5, 455 + WebInspector.TimelineCalculat or._minWidth); 42 view._calculator.setDisplayWindow(455 + WebInspector.TimelineCalculator. _minWidth, 5);
43 dumpDividers(view._calculator); 43 dumpDividers(view._calculator);
44 InspectorTest.addResult(""); 44 InspectorTest.addResult("");
45 } 45 }
46 46
47 function dumpFlameChartRecordsCountForRange(windowLeft, windowRight) 47 function dumpFlameChartRecordsCountForRange(windowLeft, windowRight)
48 { 48 {
49 var mainView = timeline._currentViews[0]._mainView; 49 var mainView = timeline._currentViews[0]._mainView;
50 overviewPane._overviewGrid.setWindow(windowLeft, windowRight); 50 overviewPane._overviewGrid.setWindow(windowLeft, windowRight);
51 mainView.update(); 51 mainView.update();
52 InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get()) ; 52 InspectorTest.addResult("mode = " + timeline._overviewModeSetting.get()) ;
53 InspectorTest.addResult("range = " + windowLeft + " - " + windowRight); 53 InspectorTest.addResult("range = " + windowLeft + " - " + windowRight);
54 InspectorTest.addResult("time range = " + mainView._timeWindowLeft + " - " + mainView._timeWindowRight); 54 InspectorTest.addResult("time range = " + mainView._timeWindowLeft + " - " + mainView._timeWindowRight);
55 mainView._calculator.setDisplayWindow(5, 455 + WebInspector.TimelineCalc ulator._minWidth); 55 mainView._calculator.setDisplayWindow(455 + WebInspector.TimelineCalcula tor._minWidth, 5);
56 dumpDividers(mainView._calculator); 56 dumpDividers(mainView._calculator);
57 InspectorTest.addResult(""); 57 InspectorTest.addResult("");
58 } 58 }
59 59
60 function dumpDividers(calculator) 60 function dumpDividers(calculator)
61 { 61 {
62 var dividers = WebInspector.TimelineGrid.calculateDividerOffsets(calcula tor).offsets; 62 var dividers = WebInspector.TimelineGrid.calculateDividerOffsets(calcula tor).offsets;
63 for (var i = 0; i < dividers.length; ++i) 63 for (var i = 0; i < dividers.length; ++i)
64 dividers[i] -= calculator.zeroTime(); 64 dividers[i] -= calculator.zeroTime();
65 InspectorTest.addResult("divider offsets: [" + dividers.join(", ") + "]. We are expecting round numbers."); 65 InspectorTest.addResult("divider offsets: [" + dividers.join(", ") + "]. We are expecting round numbers.");
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 <p> 122 <p>
123 It applies different ranges to the OverviewGrid and expects that current view re flects the change. 123 It applies different ranges to the OverviewGrid and expects that current view re flects the change.
124 </p> 124 </p>
125 <p> 125 <p>
126 Also it detects that after switching to another view it gets the proper time ran ge. 126 Also it detects that after switching to another view it gets the proper time ran ge.
127 </p> 127 </p>
128 128
129 </body> 129 </body>
130 </html> 130 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/devtools.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698