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.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 */
6 const DIRNAME1 = "test";
7 const DIRNAME1_CORRECT = "test/";
8 const DIRNAME2 = "test2/";
9 const time = Date.now();
11 function run_test()
12 {
13 zipW.open(tmpFile, PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE);
15 zipW.addEntryDirectory(DIRNAME1, time * PR_USEC_PER_MSEC, false);
16 do_check_false(zipW.hasEntry(DIRNAME1));
17 do_check_true(zipW.hasEntry(DIRNAME1_CORRECT));
18 var entry = zipW.getEntry(DIRNAME1_CORRECT);
19 do_check_true(entry.isDirectory);
21 zipW.addEntryDirectory(DIRNAME2, time * PR_USEC_PER_MSEC, false);
22 do_check_true(zipW.hasEntry(DIRNAME2));
23 entry = zipW.getEntry(DIRNAME2);
24 do_check_true(entry.isDirectory);
26 zipW.close();
27 }