js/src/jit-test/tests/debug/Debugger-findScripts-02.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/debug/Debugger-findScripts-02.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,16 @@
     1.4 +// In a debuggee with functions, findScripts finds those functions' scripts.
     1.5 +
     1.6 +var g = newGlobal();
     1.7 +g.eval('function f(){}');
     1.8 +g.eval('function g(){}');
     1.9 +g.eval('function h(){}');
    1.10 +
    1.11 +var dbg = new Debugger();
    1.12 +var gw = dbg.addDebuggee(g);
    1.13 +var fw = gw.makeDebuggeeValue(g.f);
    1.14 +var gw = gw.makeDebuggeeValue(g.g);
    1.15 +var hw = gw.makeDebuggeeValue(g.h);
    1.16 +
    1.17 +assertEq(dbg.findScripts().indexOf(fw.script) != -1, true);
    1.18 +assertEq(dbg.findScripts().indexOf(gw.script) != -1, true);
    1.19 +assertEq(dbg.findScripts().indexOf(hw.script) != -1, true);

mercurial