OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/inspector-protocol-test.js"></script> | |
4 <script> | |
5 | |
6 function testFunction() | |
7 { | |
8 var a = 2; | |
9 debugger; | |
10 } | |
11 | |
12 function test() | |
13 { | |
14 InspectorTest.sendCommand("Debugger.enable", {}); | |
15 InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPaused; | |
16 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(te
stFunction, 0)" }); | |
17 | |
18 function handleDebuggerPaused(messageObject) | |
19 { | |
20 InspectorTest.log("Paused on 'debugger;'"); | |
21 var topFrame = messageObject.params.callFrames[0]; | |
22 topFrame.location.scriptId = "42"; | |
23 topFrame.functionLocation.scriptId = "42"; | |
24 InspectorTest.log("Top frame location: " + JSON.stringify(topFrame.locat
ion)); | |
25 InspectorTest.log("Top frame functionLocation: " + JSON.stringify(topFra
me.functionLocation)); | |
26 InspectorTest.completeTest(); | |
27 } | |
28 } | |
29 </script> | |
30 </head> | |
31 <body onLoad="runTest();"> | |
32 </body> | |
33 </html> | |
OLD | NEW |