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

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

Issue 1752453002: Revert of Timeline: extract and rename TracingModelLoader into a file of its own (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
11 var timeline = WebInspector.panels.timeline; 13 var timeline = WebInspector.panels.timeline;
12 timeline._onModeChanged(); 14 timeline._onModeChanged();
13 timeline._currentViews[0]._automaticallySizeWindow = true; 15 timeline._currentViews[0]._automaticallySizeWindow = true;
14 16
15 function requestWindowTimesHook(startTime, endTime) 17 function requestWindowTimesHook(startTime, endTime)
16 { 18 {
17 if (startTime) 19 if (startTime)
18 InspectorTest.addResult("time delta: " + (endTime - startTime)); 20 InspectorTest.addResult("time delta: " + (endTime - startTime));
19 } 21 }
20 22
21 timeline.requestWindowTimes = requestWindowTimesHook; 23 timeline.requestWindowTimes = requestWindowTimesHook;
22 InspectorTest.loadTimeline(InspectorTest.timelineData()); 24 var model = timeline._model;
23 25
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());
24 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
25 } 35 }
26 36
27 </script> 37 </script>
28 </head> 38 </head>
29 39
30 <body onload="runTest()"> 40 <body onload="runTest()">
31 <p> 41 <p>
32 Tests the TimelineFlameChart automatically sized window. 42 Tests the TimelineFlameChart automatically sized window.
33 </p> 43 </p>
34 44
35 </body> 45 </body>
36 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698