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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-flame-chart-automatically-size-window.html

Issue 1739193003: Timeline: extract and rename TracingModelLoader into a file of its own (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 9 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
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/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script src="../../http/tests/inspector/timeline-test.js"></script> 5 <script src="../../http/tests/inspector/timeline-test.js"></script>
6 <script src="resources/timeline-data.js"></script> 6 <script src="resources/timeline-data.js"></script>
7 <script> 7 <script>
8 8
9 function test() 9 function test()
10 { 10 {
11 var timelineData = InspectorTest.timelineData();
12
13 var timeline = WebInspector.panels.timeline; 11 var timeline = WebInspector.panels.timeline;
14 timeline._onModeChanged(); 12 timeline._onModeChanged();
15 timeline._currentViews[0]._automaticallySizeWindow = true; 13 timeline._currentViews[0]._automaticallySizeWindow = true;
16 14
17 function requestWindowTimesHook(startTime, endTime) 15 function requestWindowTimesHook(startTime, endTime)
18 { 16 {
19 if (startTime) 17 if (startTime)
20 InspectorTest.addResult("time delta: " + (endTime - startTime)); 18 InspectorTest.addResult("time delta: " + (endTime - startTime));
21 } 19 }
22 20
23 timeline.requestWindowTimes = requestWindowTimesHook; 21 timeline.requestWindowTimes = requestWindowTimesHook;
24 var model = timeline._model; 22 InspectorTest.loadTimeline(InspectorTest.timelineData());
25 23
26 function createFileReader(file, delegate)
27 {
28 return new InspectorTest.FakeFileReader(timelineData, delegate, timeline ._saveToFile.bind(timeline));
29 }
30
31 InspectorTest.override(model, "_createFileReader", createFileReader);
32
33 model.loadFromFile({}, new WebInspector.Progress());
34 InspectorTest.completeTest(); 24 InspectorTest.completeTest();
35 } 25 }
36 26
37 </script> 27 </script>
38 </head> 28 </head>
39 29
40 <body onload="runTest()"> 30 <body onload="runTest()">
41 <p> 31 <p>
42 Tests the TimelineFlameChart automatically sized window. 32 Tests the TimelineFlameChart automatically sized window.
43 </p> 33 </p>
44 34
45 </body> 35 </body>
46 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698