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

Unified Diff: LayoutTests/inspector/debugger/async-callstack-eval.html

Issue 136333007: DevTools: Implement evaluation on async call frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 11 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: LayoutTests/inspector/debugger/async-callstack-eval.html
diff --git a/LayoutTests/inspector/debugger/async-callstack-eval.html b/LayoutTests/inspector/debugger/async-callstack-eval.html
new file mode 100644
index 0000000000000000000000000000000000000000..2b02e26b3b63169d2e1ca3b54e4e19a1fa3937dc
--- /dev/null
+++ b/LayoutTests/inspector/debugger/async-callstack-eval.html
@@ -0,0 +1,79 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+var a = "FAIL";
+function testFunction()
+{
+ var a = "PASS";
+ function inner()
+ {
+ var b = a || "FAIL";
+ setTimeout(timeout, 0);
+ }
+ inner();
+
+ a = b = "FAIL: re-assigned";
+}
+
+function timeout()
+{
+ var b = "FAIL";
+ debugger;
+}
+
+var test = function()
+{
+ var maxAsyncCallStackDepth = 4;
+
+ InspectorTest.setQuiet(true);
+ InspectorTest.startDebuggerTest(step1);
+
+ function step1()
+ {
+ DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused);
+ }
+
+ function didPaused(callFrames, reason, breakpointIds, asyncStackTrace)
+ {
+ InspectorTest.captureStackTrace(callFrames, asyncStackTrace);
+
+ var pane = WebInspector.panels.sources.sidebarPanes.callstack;
+ InspectorTest.addResult("Select call frame: " + pane.placards[1].title);
+ pane._placardSelected(pane.placards[1]);
+ InspectorTest.runAfterPendingDispatches(step3);
+ }
+
+ function step3()
+ {
+ InspectorTest.evaluateInConsoleAndDump("a", step4);
+ }
+
+ function step4()
+ {
+ InspectorTest.evaluateInConsoleAndDump("b", tearDown);
+ }
+
+ function tearDown()
+ {
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests evaluation in an async call frame.
+</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698