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 | function TestCase(n, d, e, a) |
michael@0 | 2 | this.passed = getTestCaseResult(e, a); |
michael@0 | 3 | function getTestCaseResult(expected, actual) { |
michael@0 | 4 | if (actual != actual) |
michael@0 | 5 | return gTestcases; |
michael@0 | 6 | } |
michael@0 | 7 | gczeal(4); |
michael@0 | 8 | try { |
michael@0 | 9 | var TEST_STRING = new String(""); |
michael@0 | 10 | new TestCase(null, 0,eval("x = new Boolean(true); x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(0)") ); |
michael@0 | 11 | new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(1)")); |
michael@0 | 12 | new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(2)")); |
michael@0 | 13 | new TestCase(null, null, 0, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(3)")); |
michael@0 | 14 | new TestCase(null, null, Number.NaN, eval("x.charCodeAt=String.prototype.charCodeAt;x.charCodeAt(4)")); |
michael@0 | 15 | new new let (r) (function () {}) (); |
michael@0 | 16 | } catch(e) {} |