Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats.html

Issue 2464973003: DevTools: Add test for Runtime Stats present on timeline. (Closed)
Patch Set: addressing comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-runtime-stats-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698