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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/paint-profiler-update.html

Issue 2637443004: DevTools: bring back old landing page in timeline/performance. (Closed)
Patch Set: review comments addressed Created 3 years, 11 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/timeline-test.js"></script> 4 <script src="../../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 function performActions() 6 function performActions()
7 { 7 {
8 var callback; 8 var callback;
9 var promise = new Promise((fulfill) => callback = fulfill); 9 var promise = new Promise((fulfill) => callback = fulfill);
10 var square = document.getElementById("square"); 10 var square = document.getElementById("square");
11 step1(); 11 step1();
12 12
13 function step1() 13 function step1()
14 { 14 {
15 square.style.backgroundColor = "red"; 15 square.style.backgroundColor = "red";
16 testRunner.layoutAndPaintAsyncThen(step2); 16 testRunner.layoutAndPaintAsyncThen(step2);
17 } 17 }
18 18
19 function step2() 19 function step2()
20 { 20 {
21 square.style.backgroundColor = "black"; 21 square.style.backgroundColor = "black";
22 testRunner.layoutAndPaintAsyncThen(callback); 22 testRunner.layoutAndPaintAsyncThen(callback);
23 } 23 }
24 return promise; 24 return promise;
25 } 25 }
26 26
27 function test() 27 function test()
28 { 28 {
29 const panel = UI.panels.timeline; 29 const panel = UI.panels.timeline;
30 panel._landingPage._tabbedPane.selectTab(Timeline.TimelineLandingPage.PageId .Advanced);
31 panel._captureLayersAndPicturesSetting.set(true); 30 panel._captureLayersAndPicturesSetting.set(true);
32 panel._onModeChanged(); 31 panel._onModeChanged();
33 32
34 InspectorTest.invokeAsyncWithTimeline("performActions", onRecordingDone); 33 InspectorTest.invokeAsyncWithTimeline("performActions", onRecordingDone);
35 var paintEvents = []; 34 var paintEvents = [];
36 function onRecordingDone() 35 function onRecordingDone()
37 { 36 {
38 var events = InspectorTest.timelineModel()._mainThreadEvents; 37 var events = InspectorTest.timelineModel()._mainThreadEvents;
39 for (var event of events) { 38 for (var event of events) {
40 if (event.name === TimelineModel.TimelineModel.RecordType.Paint) { 39 if (event.name === TimelineModel.TimelineModel.RecordType.Paint) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 77
79 <body onload="runTest()"> 78 <body onload="runTest()">
80 <p> 79 <p>
81 Tests that paint profiler is properly update when an event is selected in Flame Chart 80 Tests that paint profiler is properly update when an event is selected in Flame Chart
82 </p> 81 </p>
83 82
84 <div id="square" style="width: 40px; height: 40px"></div> 83 <div id="square" style="width: 40px; height: 40px"></div>
85 84
86 </body> 85 </body>
87 </html> 86 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698