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) |
| 92 InspectorTest.printTraceEventProperties(event); |
91 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) | 93 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) |
92 expectedFunctions.delete(event.args.data.functionName); | 94 expectedFunctions.delete(event.args.data.functionName); |
93 return expectedFunctions; | 95 return expectedFunctions; |
94 } | 96 } |
95 } | 97 } |
96 | 98 |
97 </script> | 99 </script> |
98 </head> | 100 </head> |
99 | 101 |
100 <body onload="startWorkerAndRunTest()"> | 102 <body onload="startWorkerAndRunTest()"> |
101 <p> | 103 <p> |
102 Tests js cpu profile in timeline. | 104 Tests js cpu profile in timeline. |
103 </p> | 105 </p> |
104 </body> | 106 </body> |
105 </html> | 107 </html> |
OLD | NEW |