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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html

Issue 2384533002: [DevTools] Better label for async function call stacks (Closed)
Patch Set: addressed comments Created 4 years, 2 months 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/sources/debugger-ui/async-call-stack-async-function.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html
new file mode 100644
index 0000000000000000000000000000000000000000..a5bc7eda653409ec52986cbff28500ac9d786724
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+async function foo()
+{
+ await Promise.resolve(1);
+ await Promise.resolve(2);
+ debugger;
+}
+
+async function boo()
+{
+ await Promise.resolve(3);
+ await foo();
+}
+
+async function testFunction()
+{
+ await Promise.resolve(4);
+ await boo();
+}
+//# sourceURL=test.js
+</script>
+<script>
+var test = function()
+{
+ InspectorTest.DebuggerAgent.setAsyncCallStackDepth(200);
+
+ InspectorTest.startDebuggerTestPromise(/* quiet */ true)
+ .then(() => InspectorTest.runTestFunctionAndWaitUntilPausedPromise())
+ .then(() => dumpCallStackSidebarPane())
+ .then(() => InspectorTest.completeDebuggerTest());
+
+ function dumpCallStackSidebarPane()
+ {
+ var callFrameList = self.runtime.sharedInstance(WebInspector.CallStackSidebarPane).callFrameList;
+ for (var item of callFrameList._items)
+ InspectorTest.addResult(item.element.textContent.replace(/VM\d+/g, "VM"));
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests that call stack sidebar contains correct labels for async await functions.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698