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

Unified Diff: LayoutTests/inspector/sources/debugger/skip-stack-frames-steps.html

Issue 210243002: DevTools: [Frameworks] Bugfix: do StepOut in framework code after StepIn limit is up. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/sources/debugger/skip-stack-frames-steps.html
diff --git a/LayoutTests/inspector/sources/debugger/skip-stack-frames-steps.html b/LayoutTests/inspector/sources/debugger/skip-stack-frames-steps.html
new file mode 100644
index 0000000000000000000000000000000000000000..5cdbf2d06b21f7fbdfe7fbf350f006e99fe2a874
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/skip-stack-frames-steps.html
@@ -0,0 +1,97 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script src="resources/framework.js"></script>
+<script>
+
+function testFunction()
+{
+ for (var i = 1, func; func = eval("typeof test" + i + " === 'function' && test" + i); ++i)
+ func();
+}
+
+function callback()
+{
+ return 0;
+}
+
+function test1()
+{
+ debugger;
+ Framework.empty();
+}
+
+function test2()
+{
+ debugger;
+ Framework.doSomeWork();
+}
+
+function test3()
+{
+ debugger;
+ Framework.safeRun(Framework.empty, callback); // Should step into callback
+}
+
+function test4()
+{
+ debugger;
+ Framework.safeRun(Framework.doSomeWork, callback); // Should NOT step into callback (otherwise too many StepIns)
+}
+
+function test5()
+{
+ debugger;
+ Framework.safeRun(Framework.empty, Framework.throwFrameworkException, callback); // Should be enough to step into callback
+}
+
+function test()
+{
+ var frameworkRegexString = "/framework\\.js$";
+ var totalDebuggerStatements = 5;
+
+ InspectorTest.setQuiet(true);
+ InspectorTest.startDebuggerTest(step1);
+
+ function step1()
+ {
+ DebuggerAgent.skipStackFrames(frameworkRegexString, step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused);
+ }
+
+ var step = 0;
+ var stepInCount = 0;
+ function didPaused(callFrames, reason, breakpointIds, asyncStackTrace)
+ {
+ if (stepInCount < 2) {
+ ++stepInCount;
+ WebInspector.panels.sources._stepIntoButton.element.click();
+ InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(InspectorTest, didPaused));
+ return;
+ }
+
+ stepInCount = 0;
+ InspectorTest.captureStackTrace(callFrames);
+ InspectorTest.addResult("");
+ if (++step < totalDebuggerStatements)
+ InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPaused));
+ else
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<input type='button' onclick='testFunction()' value='Test'/>
+<p>
+Tests the skip stack frames feature when stepping.
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698