| 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> | 5 <script> |
| 6 | 6 |
| 7 // Save references to the worker objects to make sure they are not GC'ed. | 7 // Save references to the worker objects to make sure they are not GC'ed. |
| 8 var worker1; | 8 var worker1; |
| 9 var worker2; | 9 var worker2; |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 InspectorTest.addResult(thread.name); | 81 InspectorTest.addResult(thread.name); |
| 82 var missingFunctions = thread.events.reduce(processEvent, expectedFuncti
ons); | 82 var missingFunctions = thread.events.reduce(processEvent, expectedFuncti
ons); |
| 83 if (missingFunctions.size) { | 83 if (missingFunctions.size) { |
| 84 InspectorTest.addResult("FAIL: missing functions:"); | 84 InspectorTest.addResult("FAIL: missing functions:"); |
| 85 missingFunctions.forEach(InspectorTest.addResult); | 85 missingFunctions.forEach(InspectorTest.addResult); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 function processEvent(expectedFunctions, event) | 89 function processEvent(expectedFunctions, event) |
| 90 { | 90 { |
| 91 if (event.name === WebInspector.TimelineModel.RecordType.EvaluateScript) | 91 if (event.name === TimelineModel.TimelineModel.RecordType.EvaluateScript
) |
| 92 InspectorTest.printTraceEventProperties(event); | 92 InspectorTest.printTraceEventProperties(event); |
| 93 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) | 93 if (event.name === TimelineModel.TimelineModel.RecordType.JSFrame) |
| 94 expectedFunctions.delete(event.args.data.functionName); | 94 expectedFunctions.delete(event.args.data.functionName); |
| 95 return expectedFunctions; | 95 return expectedFunctions; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 </script> | 99 </script> |
| 100 </head> | 100 </head> |
| 101 | 101 |
| 102 <body onload="startWorkerAndRunTest()"> | 102 <body onload="startWorkerAndRunTest()"> |
| 103 <p> | 103 <p> |
| 104 Tests js cpu profile in timeline. | 104 Tests js cpu profile in timeline. |
| 105 </p> | 105 </p> |
| 106 </body> | 106 </body> |
| 107 </html> | 107 </html> |
| OLD | NEW |