49 lines
3.1 KiB
HTML
49 lines
3.1 KiB
HTML
<html>
|
|
<head>
|
|
<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
|
|
<script src="resources/exception.js"></script>
|
|
<script>
|
|
function test()
|
|
{
|
|
InspectorProtocol.sendCommand("Debugger.enable", {});
|
|
InspectorProtocol.sendCommand("Debugger.setBreakpointsActive", {active: true});
|
|
InspectorProtocol.sendCommand("Debugger.setPauseOnExceptions", {state: "none"}, function(responseObject) {
|
|
InspectorProtocol.checkForError(responseObject);
|
|
ProtocolTest.log("Debugger.setPauseOnExceptions - none");
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { 1+1; }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { noException(); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(noException, 7); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { try{ ({}).a.b.c.d } catch (e) { console.log(`caught inline: ${stringifyError(e)}`); } }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionBasic, 1); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionDOM, 2); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionInHostFunction, 3); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwString, 10); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwParam, 5, new Error('error message')); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { {}.a.b.c.d; }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionBasic(); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionDOM(); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionInHostFunction(); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwString(); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam({x:1}); }, 0);"});
|
|
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam(new Error('error message')); }, 0);"}, function() {
|
|
setTimeout(function() {
|
|
ProtocolTest.log("PASS: No pauses");
|
|
ProtocolTest.completeTest();
|
|
}, 10);
|
|
});
|
|
});
|
|
|
|
InspectorProtocol.eventHandler["Debugger.paused"] = function(messageObject)
|
|
{
|
|
ProtocolTest.log("Paused!");
|
|
ProtocolTest.log("FAIL");
|
|
ProtocolTest.completeTest();
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="runTest()">
|
|
<p>Debugger.setPauseOnExceptions none</p>
|
|
</body>
|
|
</html>
|