js/jsd/test/bug507448.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     2 function f() {}
     3 function g(a,b) {}
     4 function h(me, too, here) { var x = 1; }
     5 function annoying(a, b, a, b, b, a) {}
     6 function manyLocals(a, b, c, d, e, f, g, h, i, j, k, l, m) {
     7   var n, o, p, q, r, s, t, u, v, w, x, y, z;
     8 }
    10 assertArraysEqual(jsd.wrapValue(f).script.getParameterNames(), []);
    11 assertArraysEqual(jsd.wrapValue(g).script.getParameterNames(), ["a", "b"]);
    12 assertArraysEqual(jsd.wrapValue(h).script.getParameterNames(), ["me", "too", "here"]);
    13 assertArraysEqual(jsd.wrapValue(annoying).script.getParameterNames(),
    14                   ["a", "b", "a", "b", "b", "a"]);
    15 assertArraysEqual(jsd.wrapValue(manyLocals).script.getParameterNames(),
    16                   "abcdefghijklm".split(""));
    18 if (!jsdOnAtStart) {
    19   // turn JSD off if it wasn't on when this test started
    20   jsd.off();
    21   ok(!jsd.isOn, "JSD shouldn't be running at the end of this test.");
    22 }
    24 SimpleTest.finish();

mercurial