js/src/jit-test/tests/debug/Source-elementAttributeName.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/Source-elementAttributeName.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,11 @@
     1.4 +// Source.prototype.elementAttributeName can be a string or undefined.
     1.5 +
     1.6 +var g = newGlobal('new-compartment');
     1.7 +var dbg = new Debugger;
     1.8 +var gw = dbg.addDebuggee(g);
     1.9 +g.evaluate("function f(x) { return 2*x; }", {elementAttributeName: "src"});
    1.10 +var fw = gw.getOwnPropertyDescriptor('f').value;
    1.11 +assertEq(fw.script.source.elementAttributeName, "src");
    1.12 +g.evaluate("function f(x) { return 2*x; }");
    1.13 +var fw = gw.getOwnPropertyDescriptor('f').value;
    1.14 +assertEq(fw.script.source.elementAttributeName, undefined);

mercurial