michael@0: michael@0: function f() {} michael@0: function g(a,b) {} michael@0: function h(me, too, here) { var x = 1; } michael@0: function annoying(a, b, a, b, b, a) {} michael@0: function manyLocals(a, b, c, d, e, f, g, h, i, j, k, l, m) { michael@0: var n, o, p, q, r, s, t, u, v, w, x, y, z; michael@0: } michael@0: michael@0: assertArraysEqual(jsd.wrapValue(f).script.getParameterNames(), []); michael@0: assertArraysEqual(jsd.wrapValue(g).script.getParameterNames(), ["a", "b"]); michael@0: assertArraysEqual(jsd.wrapValue(h).script.getParameterNames(), ["me", "too", "here"]); michael@0: assertArraysEqual(jsd.wrapValue(annoying).script.getParameterNames(), michael@0: ["a", "b", "a", "b", "b", "a"]); michael@0: assertArraysEqual(jsd.wrapValue(manyLocals).script.getParameterNames(), michael@0: "abcdefghijklm".split("")); michael@0: michael@0: if (!jsdOnAtStart) { michael@0: // turn JSD off if it wasn't on when this test started michael@0: jsd.off(); michael@0: ok(!jsd.isOn, "JSD shouldn't be running at the end of this test."); michael@0: } michael@0: michael@0: SimpleTest.finish();