Chromium Code Reviews| 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..c0152e832d417d311629ed07a3e2b364175c4f8f |
| --- /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 Promise.resolve(div.offsetWidth); |
|
caseq
2016/11/01 01:09:00
make it sync, remove the promise.
alph
2016/11/01 01:13:10
Done.
|
| +} |
| + |
| +function test() |
| +{ |
| + Runtime.experiments.enableForTest("timelineV8RuntimeCallStats"); |
| + WebInspector.settingForTest("showNativeFunctionsInJSProfile").set(true); |
| + var model = WebInspector.panels.timeline._model; |
| + InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
|
caseq
2016/11/01 01:09:00
evaluateWithTimeline()
alph
2016/11/01 01:13:10
Done.
|
| + |
| + 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> |