| 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="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 Loading... |
| 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> |
| OLD | NEW |