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> |