| Index: third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..64771d537e181f1de22ebb0783ae0dbc7e94e76b
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats.html
|
| @@ -0,0 +1,41 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../../http/tests/inspector/timeline-test.js"></script>
|
| +<script>
|
| +
|
| +function performActions()
|
| +{
|
| + var div = document.getElementById("foo")
|
| + div.style.width = "10px";
|
| + return div.offsetWidth;
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + Runtime.experiments.enableForTest("timelineV8RuntimeCallStats");
|
| + WebInspector.settingForTest("showNativeFunctionsInJSProfile").set(true);
|
| + var model = WebInspector.panels.timeline._model;
|
| + InspectorTest.evaluateWithTimeline("performActions()", finish);
|
| +
|
| + function finish()
|
| + {
|
| + var frame = model.mainThreadEvents()
|
| + .filter(e => e.name === WebInspector.TimelineModel.RecordType.JSFrame)
|
| + .map(e => e.args["data"]["callFrame"])
|
| + .find(frame => frame.functionName === "FunctionCallback" && frame.url === "native V8Runtime");
|
| + InspectorTest.assertTrue(!!frame, "FunctionCallback frame not found");
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<div id="foo" />
|
| +<p>
|
| +Check that RuntimeCallStats are present in profile.
|
| +</p>
|
| +</body>
|
| +</html>
|
|
|