| 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 function performActions() | 7 function performActions() |
| 8 { | 8 { |
| 9 var div = document.getElementById("foo") | 9 var div = document.getElementById("foo") |
| 10 div.style.width = "10px"; | 10 div.style.width = "10px"; |
| 11 return div.offsetWidth; | 11 return div.offsetWidth; |
| 12 } | 12 } |
| 13 | 13 |
| 14 function test() | 14 function test() |
| 15 { | 15 { |
| 16 Runtime.experiments.enableForTest("timelineV8RuntimeCallStats"); | 16 Runtime.experiments.enableForTest("timelineV8RuntimeCallStats"); |
| 17 Runtime.experiments.enableForTest("timelineShowAllEvents"); | 17 Runtime.experiments.enableForTest("timelineShowAllEvents"); |
| 18 WebInspector.settingForTest("showNativeFunctionsInJSProfile").set(true); | 18 Common.settingForTest("showNativeFunctionsInJSProfile").set(true); |
| 19 var model = WebInspector.panels.timeline._model; | 19 var model = UI.panels.timeline._model; |
| 20 InspectorTest.evaluateWithTimeline("performActions()", finish); | 20 InspectorTest.evaluateWithTimeline("performActions()", finish); |
| 21 | 21 |
| 22 function finish() | 22 function finish() |
| 23 { | 23 { |
| 24 var frame = model.mainThreadEvents() | 24 var frame = model.mainThreadEvents() |
| 25 .filter(e => e.name === WebInspector.TimelineModel.RecordType.JSFram
e) | 25 .filter(e => e.name === TimelineModel.TimelineModel.RecordType.JSFra
me) |
| 26 .map(e => e.args["data"]["callFrame"]) | 26 .map(e => e.args["data"]["callFrame"]) |
| 27 .find(frame => frame.functionName === "FunctionCallback" && frame.ur
l === "native V8Runtime"); | 27 .find(frame => frame.functionName === "FunctionCallback" && frame.ur
l === "native V8Runtime"); |
| 28 InspectorTest.assertTrue(!!frame, "FunctionCallback frame not found"); | 28 InspectorTest.assertTrue(!!frame, "FunctionCallback frame not found"); |
| 29 InspectorTest.completeTest(); | 29 InspectorTest.completeTest(); |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 </script> | 33 </script> |
| 34 </head> | 34 </head> |
| 35 | 35 |
| 36 <body onload="runTest()"> | 36 <body onload="runTest()"> |
| 37 <div id="foo" /> | 37 <div id="foo" /> |
| 38 <p> | 38 <p> |
| 39 Check that RuntimeCallStats are present in profile. | 39 Check that RuntimeCallStats are present in profile. |
| 40 </p> | 40 </p> |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |