| 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="../../../http/tests/inspector/timeline-test.js"></script> | 4 <script src="../../../http/tests/inspector/timeline-test.js"></script> |
| 5 <script src="../../tracing-test.js"></script> | 5 <script src="../../tracing-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function simplePerformanceMeasure() | 8 function simplePerformanceMeasure() |
| 9 { | 9 { |
| 10 performance.mark("a-start"); | 10 performance.mark("a-start"); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 ]); | 85 ]); |
| 86 | 86 |
| 87 function dumpUserTimings() | 87 function dumpUserTimings() |
| 88 { | 88 { |
| 89 var model = InspectorTest.timelineModel(); | 89 var model = InspectorTest.timelineModel(); |
| 90 var asyncEvents = model.mainThreadAsyncEvents() | 90 var asyncEvents = model.mainThreadAsyncEvents() |
| 91 | 91 |
| 92 asyncEvents.forEach(function(eventGroup) { | 92 asyncEvents.forEach(function(eventGroup) { |
| 93 eventGroup.forEach(function(event) { | 93 eventGroup.forEach(function(event) { |
| 94 if (event.hasCategory(WebInspector.TimelineModel.Category.UserTi
ming)) | 94 if (event.hasCategory(TimelineModel.TimelineModel.Category.UserT
iming)) |
| 95 InspectorTest.addResult(event.name); | 95 InspectorTest.addResult(event.name); |
| 96 }); | 96 }); |
| 97 }) | 97 }) |
| 98 } | 98 } |
| 99 | 99 |
| 100 function performActions(actions, next) | 100 function performActions(actions, next) |
| 101 { | 101 { |
| 102 InspectorTest.evaluateWithTimeline(actions, _ => { dumpUserTimings(); ne
xt(); }); | 102 InspectorTest.evaluateWithTimeline(actions, _ => { dumpUserTimings(); ne
xt(); }); |
| 103 | 103 |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 | 106 |
| 107 </script> | 107 </script> |
| 108 </head> | 108 </head> |
| 109 | 109 |
| 110 <body onload="runTest()"> | 110 <body onload="runTest()"> |
| 111 <p>Test performance.mark/measure records on Timeline</p> | 111 <p>Test performance.mark/measure records on Timeline</p> |
| 112 | 112 |
| 113 </body> | 113 </body> |
| 114 </html> | 114 </html> |
| OLD | NEW |