js/src/jit-test/tests/debug/Debugger-findScripts-10.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-10.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,13 @@
     1.4 +// Specifying a non-debuggee global in a Debugger.prototype.findScripts query should
     1.5 +// cause the query to return no scripts.
     1.6 +
     1.7 +var g1 = newGlobal();
     1.8 +g1.eval('function f(){}');
     1.9 +
    1.10 +var g2 = newGlobal();
    1.11 +g2.eval('function g(){}');
    1.12 +
    1.13 +var dbg = new Debugger(g1);
    1.14 +assertEq(dbg.findScripts({global:g1}).length > 0, true);
    1.15 +assertEq(dbg.findScripts({global:g2}).length, 0);
    1.16 +assertEq(dbg.findScripts({global:this}).length, 0);

mercurial