blob: 4d957c8092737a1ff24b1d3a75b24cc119dab1cf [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script src="../../http/tests/inspector/debugger/debugger-test.js"></script>
<script src="./resources/stack-overflow.js"></script>
<script>
function test()
{
var scriptObject;
function startTest() {
InspectorTest.log("Starting Test");
// 0 based indices.
let testInfo = {line: 8, column: 8};
let location = scriptObject.createSourceCodeLocation(testInfo.line, testInfo.column);
let breakpoint = new WI.Breakpoint(location);
WI.debuggerManager.addBreakpoint(breakpoint);
InspectorTest.evaluateInPage("start()");
}
WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.CallFramesDidChange, function(event) {
var activeCallFrame = WI.debuggerManager.activeCallFrame;
if (!activeCallFrame)
return;
WI.debuggerManager.resume();
});
WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.Resumed, function(event) {
InspectorTest.log("Tests done");
InspectorTest.completeTest();
});
WI.debuggerManager.addEventListener(WI.DebuggerManager.Event.ScriptAdded, function(event) {
eventScriptObject = event.data.script;
if (/stack-overflow\.js$/.test(eventScriptObject.url)) {
scriptObject = eventScriptObject;
startTest();
return;
}
});
InspectorTest.reloadPage();
}
</script>
</head>
<body onload="runTest()">
<p>Testing that we don't crash on a stack overflow.</p>
</body>
</html>