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 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/
3 */
5 /* File in use complete MAR file patch apply success test */
7 function run_test() {
8 setupTestCommon();
9 gTestFiles = gTestFilesCompleteSuccess;
10 gTestDirs = gTestDirsCompleteSuccess;
11 setupUpdaterTest(FILE_COMPLETE_MAR, false, true);
13 // Launch an existing file so it is in use during the update.
14 let fileInUseBin = getApplyDirFile(gTestFiles[13].relPathDir +
15 gTestFiles[13].fileName);
16 let args = [getApplyDirPath() + "a/b/", "input", "output", "-s",
17 HELPER_SLEEP_TIMEOUT];
18 let fileInUseProcess = AUS_Cc["@mozilla.org/process/util;1"].
19 createInstance(AUS_Ci.nsIProcess);
20 fileInUseProcess.init(fileInUseBin);
21 fileInUseProcess.run(false, args, args.length);
23 do_timeout(TEST_HELPER_TIMEOUT, waitForHelperSleep);
24 }
26 function doUpdate() {
27 runUpdate(0, STATE_SUCCEEDED);
28 }
30 function checkUpdateApplied() {
31 setupHelperFinish();
32 }
34 function checkUpdate() {
35 checkFilesAfterUpdateSuccess();
36 checkUpdateLogContains(ERR_BACKUP_DISCARD);
37 checkCallbackAppLog();
38 }