michael@0: // Lazy scripts should correctly report line offsets michael@0: michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(); michael@0: michael@0: g.eval("// Header comment\n" + // <- line 6 in this file michael@0: "\n" + michael@0: "\n" + michael@0: "function f(n) {\n" + // <- line 9 in this file michael@0: " var foo = '!';\n" + michael@0: "}"); michael@0: michael@0: dbg.addDebuggee(g); michael@0: var scripts = dbg.findScripts(); michael@0: for (var i = 0; i < scripts.length; i++) { michael@0: // Nothing should have offsets for the deffun on line 9 if lazy scripts michael@0: // correctly update the position. michael@0: assertEq(scripts[i].getLineOffsets(9).length, 0); michael@0: }