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