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

Side by Side Diff: LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html

Issue 388303002: DevTools: Get rid of WebInspector.TargetObserver (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/front_end/profiler/CPUProfileFlameChart.js » ('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="profiler-test.js"></script> 4 <script src="profiler-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var profileAndExpectations = { 9 var profileAndExpectations = {
10 _profile: { 10 _profile: {
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 } 807 }
808 }; 808 };
809 var profile = profileAndExpectations._profile; 809 var profile = profileAndExpectations._profile;
810 var startTime = profile.startTime * 1000; 810 var startTime = profile.startTime * 1000;
811 var endTime = profile.endTime * 1000; 811 var endTime = profile.endTime * 1000;
812 var samplingInterval = (endTime - startTime) / (profile.samples.length - 1); 812 var samplingInterval = (endTime - startTime) / (profile.samples.length - 1);
813 profile.timestamps = []; 813 profile.timestamps = [];
814 for (var i = 0; i < profile.samples.length; ++i) 814 for (var i = 0; i < profile.samples.length; ++i)
815 profile.timestamps.push(startTime + i * samplingInterval); 815 profile.timestamps.push(startTime + i * samplingInterval);
816 profileAndExpectations.target = function() {}; 816 profileAndExpectations.target = function() {};
817 profileAndExpectations.weakTarget = function() { return new WeakReference(nu ll);};
817 WebInspector.inspectorView.showPanel("profiles"); 818 WebInspector.inspectorView.showPanel("profiles");
818 var cpuProfileView = new WebInspector.CPUProfileView(profileAndExpectations) ; 819 var cpuProfileView = new WebInspector.CPUProfileView(profileAndExpectations) ;
819 cpuProfileView.viewSelectComboBox.setSelectedIndex(0); 820 cpuProfileView.viewSelectComboBox.setSelectedIndex(0);
820 cpuProfileView._changeView(); 821 cpuProfileView._changeView();
821 var overviewPane = cpuProfileView._flameChart._overviewPane; 822 var overviewPane = cpuProfileView._flameChart._overviewPane;
822 console.log(Object.values(overviewPane._calculateDrawData(16))); 823 console.log(Object.values(overviewPane._calculateDrawData(16)));
823 console.log(Object.values(overviewPane._calculateDrawData(8))); 824 console.log(Object.values(overviewPane._calculateDrawData(8)));
824 console.log(Object.values(overviewPane._calculateDrawData(4))); 825 console.log(Object.values(overviewPane._calculateDrawData(4)));
825 console.log(Object.values(overviewPane._calculateDrawData(2))); 826 console.log(Object.values(overviewPane._calculateDrawData(2)));
826 console.log(Object.values(overviewPane._calculateDrawData(1))); 827 console.log(Object.values(overviewPane._calculateDrawData(1)));
827 InspectorTest.completeTest(); 828 InspectorTest.completeTest();
828 } 829 }
829 830
830 </script> 831 </script>
831 </head> 832 </head>
832 <body onload="runTest()"> 833 <body onload="runTest()">
833 <p> 834 <p>
834 Tests Overview pane calculation in FlameChart for different width = 2^n with n i n range 4 - 0. 835 Tests Overview pane calculation in FlameChart for different width = 2^n with n i n range 4 - 0.
835 836
836 </p> 837 </p>
837 </body> 838 </body>
838 </html> 839 </html>
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/profiler/CPUProfileFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698