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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js

Issue 1380573002: DevTools: fix evaluation on the last async call stack in chain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaselined async-callstack-filesystem.html Created 5 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/filesystem/async-callstack-filesystem-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
index 38d074e029a163cccebaf97bdfd23aca35163bb4..1737b83751fbaa9c4426f7825c83dd935ea7e68b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
@@ -1,3 +1,8 @@
+function scheduleTestFunction()
+{
+ setTimeout(testFunction, 0);
+}
+
var initialize_DebuggerTest = function() {
InspectorTest.preloadPanel("sources");
@@ -71,7 +76,7 @@ InspectorTest.runDebuggerTestSuite = function(testSuite)
InspectorTest.runTestFunction = function()
{
- InspectorTest.evaluateInPage("setTimeout(testFunction, 0)");
+ InspectorTest.evaluateInPage("scheduleTestFunction()");
InspectorTest.addResult("Set timer for test function.");
};
@@ -271,6 +276,12 @@ InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace
results.push(s);
if (options.printReturnValue && frame.returnValue())
results.push(" <return>: " + frame.returnValue().description);
+ if (frame.functionName === "scheduleTestFunction") {
+ var remainingFrames = callFrames.length - 1 - i;
+ if (remainingFrames)
+ results.push(" <... skipped remaining frames ...>");
+ break;
+ }
}
return printed;
}
@@ -284,8 +295,6 @@ InspectorTest.captureStackTraceIntoString = function(callFrames, asyncStackTrace
var printed = printCallFrames(WebInspector.DebuggerModel.CallFrame.fromPayloadArray(debuggerModel, asyncStackTrace.callFrames));
if (!printed)
results.pop();
- if (asyncStackTrace.callFrames.peekLast().functionName === "testFunction")
- break;
asyncStackTrace = asyncStackTrace.asyncStackTrace;
}
return results.join("\n");
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/filesystem/async-callstack-filesystem-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698