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

Unified Diff: LayoutTests/inspector/sources/debugger/frameworks-step-from-framework.html

Issue 342713002: DevTools: Debugger StepInto/Out/Over initiated from a framework should not black-box it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: added missing null check Created 6 years, 6 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 | LayoutTests/inspector/sources/debugger/frameworks-step-from-framework-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/sources/debugger/frameworks-step-from-framework.html
diff --git a/LayoutTests/inspector/sources/debugger/frameworks-steppings.html b/LayoutTests/inspector/sources/debugger/frameworks-step-from-framework.html
similarity index 55%
copy from LayoutTests/inspector/sources/debugger/frameworks-steppings.html
copy to LayoutTests/inspector/sources/debugger/frameworks-step-from-framework.html
index 4f9c68e59f47d743480ae8c6dcb807ecb2f3f688..e1f2c49a14156e91f8df6a00ad9a13518c4bdfb9 100644
--- a/LayoutTests/inspector/sources/debugger/frameworks-steppings.html
+++ b/LayoutTests/inspector/sources/debugger/frameworks-step-from-framework.html
@@ -7,36 +7,10 @@
function testFunction()
{
- debugger;
- Framework.safeRun(function callback1() {
- Framework.safeRun(Framework.empty, callback2);
- });
-}
-
-function callback2()
-{
- Framework.safeRun(Framework.empty, Framework.empty); // Should be skipped: all callbacks are inside frameworks.
- Framework.safeRun(Framework.empty, Framework.throwFrameworkException, callback3); // Should be enough to step into callback3
-}
-
-function callback3()
-{
- var func = Framework.bind(callback4, null, 1);
- func = Framework.bind(func, null, 2);
- func = Framework.bind(func, null, 3);
- Framework.safeRun(func, Framework.doSomeWork);
-}
-
-function callback4()
-{
- Framework.safeRun(Framework.doSomeWork, function() {
- return 0; // Should NOT step into this callback (otherwise too many StepIns)
- });
- try {
- Framework.throwFrameworkException("message");
- } catch (e) {
- window.ex = e;
- }
+ Framework.safeRun(Framework.breakInFramework, Framework.empty)
+ Framework.safeRun(Framework.empty); // should not step inside
+ Framework.empty(); // dummy call
+ Framework.sendXHR('/foo?a=b');
}
function test()
@@ -49,23 +23,23 @@ function test()
InspectorTest.setQuiet(true);
InspectorTest.startDebuggerTest(step1);
+ var xhrPane;
+
function step1()
{
+ xhrPane = WebInspector.panels.sources.sidebarPanes.xhrBreakpoints;
+ xhrPane._setBreakpoint("foo", true);
InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
}
var actions = [
"Print", // debugger;
- "StepInto", "StepInto", "Print", // callback1
- "StepInto", "Print", // callback2
- "StepInto", "Print", // callback2, skipped
- "StepInto", "Print", // callback3
- "StepInto", "StepInto", "StepInto", "StepInto", "Print", // callback4
- "StepInto", "Print", // callback4, skipped
- "StepInto", "Print", // callback4, inside catch
- "StepOut", "Print", // return to callback3
- "StepOver", "Print", // return to callback2
- "StepInto", "Print", // return to callback1
+ "StepInto", "Print",
+ "StepOver", "Print",
+ "StepOut", "Print",
+ "StepInto", "Print", // should not step inside
+ "Resume", "Print", // should stop on XHR.send()
+ "StepInto", "Print", // should step inside framework
];
function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
@@ -79,7 +53,7 @@ function test()
}
if (!action) {
- InspectorTest.completeDebuggerTest();
+ completeTest()
return;
}
@@ -94,13 +68,22 @@ function test()
case "StepOut":
WebInspector.panels.sources._stepOutButton.element.click();
break;
+ case "Resume":
+ InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPause));
+ break;
default:
InspectorTest.addResult("FAIL: Unknown action: " + action);
- InspectorTest.completeDebuggerTest();
+ completeTest()
return;
}
InspectorTest.waitUntilResumed(InspectorTest.waitUntilPaused.bind(InspectorTest, didPause));
}
+
+ function completeTest()
+ {
+ xhrPane._removeBreakpoint("foo");
+ InspectorTest.completeDebuggerTest();
+ }
}
</script>
@@ -109,7 +92,7 @@ function test()
<body onload="runTest()">
<input type='button' onclick='testFunction()' value='Test'/>
<p>
-Tests stepping into/over/out with framework black-boxing.
+Tests stepping from framework call frames.
</p>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/frameworks-step-from-framework-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698