3 <script src="../../http/tests/inspector-protocol/resources/protocol-test.js"></script>
4 <script src="resources/breakpoint.js"></script>
8 InspectorTest.sendCommand("Debugger.enable", {});
10 InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
12 if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
13 InspectorTest.log("Found breakpoint.js");
14 var scriptIdentifier = messageObject.params.scriptId;
15 var location = {scriptId: scriptIdentifier, lineNumber: 3, columnNumber: 0};
16 InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function(responseObject) {
17 InspectorTest.checkForError(responseObject);
18 InspectorTest.sendCommand("Debugger.setBreakpoint", {location: location}, function(responseObject) {
19 if (!responseObject.error) {
20 InspectorTest.log("FAIL: Expected error setting duplicate breakpoint");
21 InspectorTest.completeTest();
23 InspectorTest.log("PASS: Received error setting duplicate breakpoint: " + responseObject.error.message);
24 InspectorTest.log("Running breakpointBasic");
25 InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointBasic()"});
32 InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
34 InspectorTest.log("Hit Breakpoint!");
35 InspectorTest.log("PASS");
36 InspectorTest.completeTest();
41 <body onload="runTest()">
42 <p>Debugger.setBreakpoint on line:0 in <script src="..."></p>