| OLD | NEW |
| 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(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 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 function dumpRecordsCountForRange(windowLeft, windowRight) | 27 function dumpRecordsCountForRange(windowLeft, windowRight) |
| 28 { | 28 { |
| 29 var view = timeline._currentViews[0]; | 29 var view = timeline._currentViews[0]; |
| 30 timeline._overviewPane._overviewGrid.setWindow(windowLeft, windowRight); | 30 timeline._overviewPane._overviewGrid.setWindow(windowLeft, windowRight); |
| 31 view._refresh(); | 31 view._refresh(); |
| 32 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.ge
t()); | 32 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.ge
t()); |
| 33 InspectorTest.addResult("range = " + windowLeft + " - " + windowRight); | 33 InspectorTest.addResult("range = " + windowLeft + " - " + windowRight); |
| 34 InspectorTest.addResult("time range = " + timeline._windowFilter._window
StartTime + " - " + timeline._windowFilter._windowEndTime); | 34 InspectorTest.addResult("time range = " + view._windowStartTime + " - "
+ view._windowEndTime); |
| 35 InspectorTest.addResult("records count: " + view._presentationModel.filt
eredRecords().length); | 35 InspectorTest.addResult("records count: " + view._presentationModel.filt
eredRecords().length); |
| 36 InspectorTest.addResult(""); | 36 InspectorTest.addResult(""); |
| 37 } | 37 } |
| 38 | 38 |
| 39 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Events); | 39 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Events); |
| 40 dumpRecordsCountForRange(0, 1); | 40 dumpRecordsCountForRange(0, 1); |
| 41 dumpRecordsCountForRange(0.25, 0.75); | 41 dumpRecordsCountForRange(0.25, 0.75); |
| 42 dumpRecordsCountForRange(0.33, 0.66); | 42 dumpRecordsCountForRange(0.33, 0.66); |
| 43 | 43 |
| 44 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Memory); | 44 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Memory); |
| 45 dumpRecordsCountForRange(0, 1); | 45 dumpRecordsCountForRange(0, 1); |
| 46 dumpRecordsCountForRange(0.25, 0.75); | 46 dumpRecordsCountForRange(0.25, 0.75); |
| 47 dumpRecordsCountForRange(0.33, 0.66); | 47 dumpRecordsCountForRange(0.33, 0.66); |
| 48 | 48 |
| 49 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Frames); | 49 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Frames); |
| 50 dumpRecordsCountForRange(0, 1); | 50 dumpRecordsCountForRange(0, 1); |
| 51 dumpRecordsCountForRange(0.25, 0.75); | 51 dumpRecordsCountForRange(0.25, 0.75); |
| 52 dumpRecordsCountForRange(0.33, 0.66); | 52 dumpRecordsCountForRange(0.33, 0.66); |
| 53 | 53 |
| 54 timeline._overviewPane._overviewGrid.setWindow(0.1, 0.9); | 54 timeline._overviewPane._overviewGrid.setWindow(0.1, 0.9); |
| 55 | 55 |
| 56 InspectorTest.addResult("---------------------------------------------------
-----"); | 56 InspectorTest.addResult("---------------------------------------------------
-----"); |
| 57 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get())
; | 57 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get())
; |
| 58 InspectorTest.addResult("time range = " + timeline._windowFilter._windowStar
tTime + " - " + timeline._windowFilter._windowEndTime); | 58 InspectorTest.addResult("time range = " + timeline._windowStartTime + " - "
+ timeline._windowEndTime); |
| 59 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Events); | 59 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Events); |
| 60 InspectorTest.addResult(""); | 60 InspectorTest.addResult(""); |
| 61 | 61 |
| 62 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get())
; | 62 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get())
; |
| 63 InspectorTest.addResult("time range = " + timeline._windowFilter._windowStar
tTime + " - " + timeline._windowFilter._windowEndTime); | 63 InspectorTest.addResult("time range = " + timeline._windowStartTime + " - "
+ timeline._windowEndTime); |
| 64 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Memory); | 64 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Memory); |
| 65 | 65 |
| 66 InspectorTest.addResult(""); | 66 InspectorTest.addResult(""); |
| 67 | 67 |
| 68 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get())
; | 68 InspectorTest.addResult("mode = " + timeline._presentationModeSetting.get())
; |
| 69 InspectorTest.addResult("time range = " + timeline._windowFilter._windowStar
tTime + " - " + timeline._windowFilter._windowEndTime); | 69 InspectorTest.addResult("time range = " + timeline._windowStartTime + " - "
+ timeline._windowEndTime); |
| 70 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Frames); | 70 timeline._selectPresentationMode(WebInspector.TimelinePanel.Mode.Frames); |
| 71 | 71 |
| 72 InspectorTest.completeTest(); | 72 InspectorTest.completeTest(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 </script> | 75 </script> |
| 76 </head> | 76 </head> |
| 77 | 77 |
| 78 <body onload="runTest()"> | 78 <body onload="runTest()"> |
| 79 <p> | 79 <p> |
| 80 Tests the Timeline window filter. | 80 Tests the Timeline window filter. |
| 81 </p> | 81 </p> |
| 82 | 82 |
| 83 <p> | 83 <p> |
| 84 It applies different ranges to the OverviewGrid and expects that current view re
flects the change. | 84 It applies different ranges to the OverviewGrid and expects that current view re
flects the change. |
| 85 </p> | 85 </p> |
| 86 <p> | 86 <p> |
| 87 Also it detects that after switching to another view it gets the proper time ran
ge. | 87 Also it detects that after switching to another view it gets the proper time ran
ge. |
| 88 </p> | 88 </p> |
| 89 | 89 |
| 90 </body> | 90 </body> |
| 91 </html> | 91 </html> |
| OLD | NEW |