js/src/jit-test/tests/debug/Source-elementAttributeName.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:137f8b422e87
1 // Source.prototype.elementAttributeName can be a string or undefined.
2
3 var g = newGlobal('new-compartment');
4 var dbg = new Debugger;
5 var gw = dbg.addDebuggee(g);
6 g.evaluate("function f(x) { return 2*x; }", {elementAttributeName: "src"});
7 var fw = gw.getOwnPropertyDescriptor('f').value;
8 assertEq(fw.script.source.elementAttributeName, "src");
9 g.evaluate("function f(x) { return 2*x; }");
10 var fw = gw.getOwnPropertyDescriptor('f').value;
11 assertEq(fw.script.source.elementAttributeName, undefined);

mercurial