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 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | */ |
michael@0 | 5 | |
michael@0 | 6 | /* General Complete MAR File Patch Apply Test */ |
michael@0 | 7 | |
michael@0 | 8 | function run_test() { |
michael@0 | 9 | setupTestCommon(); |
michael@0 | 10 | gTestFiles = gTestFilesCompleteSuccess; |
michael@0 | 11 | gTestDirs = gTestDirsCompleteSuccess; |
michael@0 | 12 | setupUpdaterTest(FILE_COMPLETE_MAR, false, false); |
michael@0 | 13 | |
michael@0 | 14 | // For Mac OS X set the last modified time for the root directory to a date in |
michael@0 | 15 | // the past to test that the last modified time is updated on a successful |
michael@0 | 16 | // update (bug 600098). |
michael@0 | 17 | if (IS_MACOSX) { |
michael@0 | 18 | let now = Date.now(); |
michael@0 | 19 | let yesterday = now - (1000 * 60 * 60 * 24); |
michael@0 | 20 | let applyToDir = getApplyDirFile(); |
michael@0 | 21 | applyToDir.lastModifiedTime = yesterday; |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | runUpdate(0, STATE_SUCCEEDED); |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | function checkUpdateApplied() { |
michael@0 | 28 | if (IS_MACOSX) { |
michael@0 | 29 | logTestInfo("testing last modified time on the apply to directory has " + |
michael@0 | 30 | "changed after a successful update (bug 600098)"); |
michael@0 | 31 | let now = Date.now(); |
michael@0 | 32 | let applyToDir = getApplyDirFile(); |
michael@0 | 33 | let timeDiff = Math.abs(applyToDir.lastModifiedTime - now); |
michael@0 | 34 | do_check_true(timeDiff < MAC_MAX_TIME_DIFFERENCE); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | checkFilesAfterUpdateSuccess(); |
michael@0 | 38 | // Sorting on Linux is different so skip this check for now. |
michael@0 | 39 | if (!IS_UNIX) { |
michael@0 | 40 | checkUpdateLogContents(LOG_COMPLETE_SUCCESS); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | checkCallbackAppLog(); |
michael@0 | 44 | } |