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

Unified Diff: LayoutTests/inspector/sources/debugger/frameworks-skip-exceptions.html

Issue 443943002: DevTools: Fix framework blackboxing for exceptions thrown inside V8 internal scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed test Created 6 years, 4 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/frameworks-skip-exceptions.html
diff --git a/LayoutTests/inspector/sources/debugger/frameworks-with-async-callstack.html b/LayoutTests/inspector/sources/debugger/frameworks-skip-exceptions.html
similarity index 54%
copy from LayoutTests/inspector/sources/debugger/frameworks-with-async-callstack.html
copy to LayoutTests/inspector/sources/debugger/frameworks-skip-exceptions.html
index 75cde71cff792940455a97689c9d04622c84709a..f798536494c968d95f73e1e9da97ce8df5629775 100644
--- a/LayoutTests/inspector/sources/debugger/frameworks-with-async-callstack.html
+++ b/LayoutTests/inspector/sources/debugger/frameworks-skip-exceptions.html
@@ -5,36 +5,18 @@
<script src="resources/framework.js"></script>
<script>
-window.callbackFromFramework = function(next)
-{
- return next();
-}
-
function testFunction()
{
- setTimeout(timeout1, 0);
-}
-
-function timeout1()
-{
- Framework.safeRun(Framework.empty, callback1);
-}
-
-function callback1()
-{
- Framework.doSomeAsyncChainCalls(callback2);
-}
+ Framework.throwFrameworkExceptionAndCatch();
+ Framework.throwInNativeAndCatch();
-function callback2()
-{
+ // All above should be skipped.
debugger;
}
function test()
{
var frameworkRegexString = "/framework\\.js$";
- var maxAsyncCallStackDepth = 4;
-
WebInspector.experimentsSettings.frameworksDebuggingSupport.enableForTest();
WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString);
@@ -43,19 +25,19 @@ function test()
function step1()
{
- DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2);
+ DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnAllExceptions);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
}
- function step2()
+ function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
{
- InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
+ InspectorTest.captureStackTrace(callFrames);
+ completeTest();
}
- function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
+ function completeTest()
{
- InspectorTest.captureStackTrace(callFrames, asyncStackTrace, { "dropFrameworkCallFrames": false });
- InspectorTest.addResult("\nPrinting visible call stack:");
- InspectorTest.captureStackTrace(callFrames, asyncStackTrace, { "dropFrameworkCallFrames": true });
+ DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions);
InspectorTest.completeDebuggerTest();
}
}
@@ -66,7 +48,7 @@ function test()
<body onload="runTest()">
<input type='button' onclick='testFunction()' value='Test'/>
<p>
-Tests the async call stacks and framework black-boxing features working together.
+Tests that framework black-boxing skips exceptions, including those that happened deeper inside V8 native script.
</p>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698