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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html

Issue 2473283003: DevTools: add per-frame grouping into aggregated timeline details (Closed)
Patch Set: rebased 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
Index: third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html
new file mode 100644
index 0000000000000000000000000000000000000000..f7746709b28420b62238ad2339d6d22d7aabef81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/timeline/page-frames.html
@@ -0,0 +1,48 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script>
+<script>
+function performActions()
+{
+ var frame1 = document.createElement("iframe");
+ frame1.name = "Frame No. 1";
+ document.body.appendChild(frame1);
+ frame1.contentWindow.document.write("console.log('frame2')");
+
+ var frame2 = document.createElement("iframe");
+ frame2.src = "../resources/blank.html";
+ document.body.appendChild(frame2);
+
+ return new Promise(fulfill => { frame2.addEventListener("load", fulfill, false) });
+}
+
+function test()
+{
+ InspectorTest.invokeAsyncWithTracing("performActions", finish);
+
+ function finish(devtoolsEvents, data)
+ {
+ InspectorTest.log("Frames in TracingStartedInPage");
+ var tracingStarted = InspectorTest.findEvent("TracingStartedInPage", "I");
+ for (var frame of tracingStarted.args["data"]["frames"] || [])
+ dumpFrame(frame);
+
+ InspectorTest.log("Frames in CommitLoad events");
+ var commitLoads = InspectorTest.findEvents("CommitLoad", "X");
+ for (var event of commitLoads)
+ dumpFrame(event.args["data"]);
+ InspectorTest.completeTest();
+ }
+
+ function dumpFrame(frame)
+ {
+ var url = frame.url.replace(/.*\/(([^/]*\/){2}[^/]*$)/, "$1");
+ InspectorTest.log(`url: ${url} name: ${frame.name}`);
+ }
+}
+</script>
+</head>
+<body onLoad="runTest();">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698