Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
[WebKit-https.git] / LayoutTests / inspector-protocol / debugger / setBreakpoint.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector-protocol/resources/protocol-test.js"></script>
4 <script src="resources/breakpoint.js"></script>
5 <script>
6 function test()
7 {
8     InspectorTest.sendCommand("Debugger.enable", {});
9
10     InspectorTest.eventHandler["Debugger.scriptParsed"] = function(messageObject)
11     {
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();
22                     } else {
23                         InspectorTest.log("PASS: Received error setting duplicate breakpoint: " + responseObject.error.message);
24                         InspectorTest.log("Running breakpointBasic");
25                         InspectorTest.sendCommand("Runtime.evaluate", {expression: "breakpointBasic()"});
26                     }
27                 });
28             });
29         }
30     }
31
32     InspectorTest.eventHandler["Debugger.paused"] = function(messageObject)
33     {
34         InspectorTest.log("Hit Breakpoint!");
35         InspectorTest.log("PASS");
36         InspectorTest.completeTest();
37     }
38 }
39 </script>
40 </head>
41 <body onload="runTest()">
42 <p>Debugger.setBreakpoint on line:0 in &lt;script src="..."&gt;</p>
43 </body>
44 </html>