https://github.com/mozilla/gecko-dev
Raw File
Tip revision: 87eb0b3f33c3b5eb9fe6fbe4f8e282854cf5c0b9 authored by ffxbld on 10 October 2012, 21:21:27 UTC
Added FENNEC_16_0_1_RELEASE FENNEC_16_0_1_BUILD1 tag(s) for changeset baef7859ea5c. DONTBUILD CLOSED TREE a=release
Tip revision: 87eb0b3
bug507448.js
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

function f() {}
function g(a,b) {}
function h(me, too, here) { var x = 1; }
function annoying(a, b, a, b, b, a) {}
function manyLocals(a, b, c, d, e, f, g, h, i, j, k, l, m) {
  var n, o, p, q, r, s, t, u, v, w, x, y, z;
}

assertArraysEqual(jsd.wrapValue(f).script.getParameterNames(), []);
assertArraysEqual(jsd.wrapValue(g).script.getParameterNames(), ["a", "b"]);
assertArraysEqual(jsd.wrapValue(h).script.getParameterNames(), ["me", "too", "here"]);
assertArraysEqual(jsd.wrapValue(annoying).script.getParameterNames(),
                  ["a", "b", "a", "b", "b", "a"]);
assertArraysEqual(jsd.wrapValue(manyLocals).script.getParameterNames(),
                  "abcdefghijklm".split(""));

if (!jsdOnAtStart) {
  // turn JSD off if it wasn't on when this test started
  jsd.off();
  ok(!jsd.isOn, "JSD shouldn't be running at the end of this test.");
}

SimpleTest.finish();
back to top