Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / debugger / call-frame-functionLocation.html
blob48baf83f69e2d5b79b7e87faa95652522aa8db43
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 function testFunction()
8 var a = 2;
9 debugger;
12 function test()
14 InspectorTest.sendCommand("Debugger.enable", {});
15 InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPaused;
16 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "setTimeout(testFunction, 0)" });
18 function handleDebuggerPaused(messageObject)
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.location));
25 InspectorTest.log("Top frame functionLocation: " + JSON.stringify(topFrame.functionLocation));
26 InspectorTest.completeTest();
29 </script>
30 </head>
31 <body onLoad="runTest();">
32 </body>
33 </html>