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 | function run_test() { |
michael@0 | 7 | setupTestCommon(); |
michael@0 | 8 | |
michael@0 | 9 | logTestInfo("testing that the update.log is moved after a successful update"); |
michael@0 | 10 | |
michael@0 | 11 | writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false); |
michael@0 | 12 | var patches = getLocalPatchString(null, null, null, null, null, null, |
michael@0 | 13 | STATE_PENDING); |
michael@0 | 14 | var updates = getLocalUpdateString(patches); |
michael@0 | 15 | writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true); |
michael@0 | 16 | writeStatusFile(STATE_SUCCEEDED); |
michael@0 | 17 | |
michael@0 | 18 | var dir = getUpdatesDir(); |
michael@0 | 19 | var log = dir.clone(); |
michael@0 | 20 | log.append("0"); |
michael@0 | 21 | log.append(FILE_UPDATE_LOG); |
michael@0 | 22 | writeFile(log, "Last Update Log"); |
michael@0 | 23 | |
michael@0 | 24 | standardInit(); |
michael@0 | 25 | |
michael@0 | 26 | logTestInfo("testing " + log.path + " shouldn't exist"); |
michael@0 | 27 | do_check_false(log.exists()); |
michael@0 | 28 | |
michael@0 | 29 | log = dir.clone(); |
michael@0 | 30 | log.append(FILE_LAST_LOG); |
michael@0 | 31 | logTestInfo("testing " + log.path + " should exist"); |
michael@0 | 32 | do_check_true(log.exists()); |
michael@0 | 33 | |
michael@0 | 34 | logTestInfo("testing " + log.path + " contents"); |
michael@0 | 35 | do_check_eq(readFile(log), "Last Update Log"); |
michael@0 | 36 | |
michael@0 | 37 | log = dir.clone(); |
michael@0 | 38 | log.append(FILE_BACKUP_LOG); |
michael@0 | 39 | logTestInfo("testing " + log.path + " shouldn't exist"); |
michael@0 | 40 | do_check_false(log.exists()); |
michael@0 | 41 | |
michael@0 | 42 | dir.append("0"); |
michael@0 | 43 | logTestInfo("testing " + dir.path + " should exist (bug 512994)"); |
michael@0 | 44 | do_check_true(dir.exists()); |
michael@0 | 45 | |
michael@0 | 46 | doTestFinish(); |
michael@0 | 47 | } |