Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | |
michael@0 | 2 | function f() {} |
michael@0 | 3 | function g(a,b) {} |
michael@0 | 4 | function h(me, too, here) { var x = 1; } |
michael@0 | 5 | function annoying(a, b, a, b, b, a) {} |
michael@0 | 6 | function manyLocals(a, b, c, d, e, f, g, h, i, j, k, l, m) { |
michael@0 | 7 | var n, o, p, q, r, s, t, u, v, w, x, y, z; |
michael@0 | 8 | } |
michael@0 | 9 | |
michael@0 | 10 | assertArraysEqual(jsd.wrapValue(f).script.getParameterNames(), []); |
michael@0 | 11 | assertArraysEqual(jsd.wrapValue(g).script.getParameterNames(), ["a", "b"]); |
michael@0 | 12 | assertArraysEqual(jsd.wrapValue(h).script.getParameterNames(), ["me", "too", "here"]); |
michael@0 | 13 | assertArraysEqual(jsd.wrapValue(annoying).script.getParameterNames(), |
michael@0 | 14 | ["a", "b", "a", "b", "b", "a"]); |
michael@0 | 15 | assertArraysEqual(jsd.wrapValue(manyLocals).script.getParameterNames(), |
michael@0 | 16 | "abcdefghijklm".split("")); |
michael@0 | 17 | |
michael@0 | 18 | if (!jsdOnAtStart) { |
michael@0 | 19 | // turn JSD off if it wasn't on when this test started |
michael@0 | 20 | jsd.off(); |
michael@0 | 21 | ok(!jsd.isOn, "JSD shouldn't be running at the end of this test."); |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | SimpleTest.finish(); |