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 file, |
michael@0 | 3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | add_autocomplete_test([ |
michael@0 | 6 | "Searching for host match without slash should match host", |
michael@0 | 7 | "file", |
michael@0 | 8 | "file.org/", |
michael@0 | 9 | function () { |
michael@0 | 10 | promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"), |
michael@0 | 11 | transition: TRANSITION_TYPED }, |
michael@0 | 12 | { uri: NetUtil.newURI("file:///c:/test.html"), |
michael@0 | 13 | transition: TRANSITION_TYPED } |
michael@0 | 14 | ); |
michael@0 | 15 | }, |
michael@0 | 16 | ]); |
michael@0 | 17 | |
michael@0 | 18 | add_autocomplete_test([ |
michael@0 | 19 | "Searching match with slash at the end should do nothing", |
michael@0 | 20 | "file.org/", |
michael@0 | 21 | "file.org/", |
michael@0 | 22 | function () { |
michael@0 | 23 | promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"), |
michael@0 | 24 | transition: TRANSITION_TYPED }, |
michael@0 | 25 | { uri: NetUtil.newURI("file:///c:/test.html"), |
michael@0 | 26 | transition: TRANSITION_TYPED } |
michael@0 | 27 | ); |
michael@0 | 28 | }, |
michael@0 | 29 | ]); |
michael@0 | 30 | |
michael@0 | 31 | add_autocomplete_test([ |
michael@0 | 32 | "Searching match with slash in the middle should match url", |
michael@0 | 33 | "file.org/t", |
michael@0 | 34 | "file.org/test/", |
michael@0 | 35 | function () { |
michael@0 | 36 | promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"), |
michael@0 | 37 | transition: TRANSITION_TYPED }, |
michael@0 | 38 | { uri: NetUtil.newURI("file:///c:/test.html"), |
michael@0 | 39 | transition: TRANSITION_TYPED } |
michael@0 | 40 | ); |
michael@0 | 41 | }, |
michael@0 | 42 | ]); |
michael@0 | 43 | |
michael@0 | 44 | add_autocomplete_test([ |
michael@0 | 45 | "Searching for non-host match without slash should not match url", |
michael@0 | 46 | "file", |
michael@0 | 47 | "file", |
michael@0 | 48 | function () { |
michael@0 | 49 | promiseAddVisits({ uri: NetUtil.newURI("file:///c:/test.html"), |
michael@0 | 50 | transition: TRANSITION_TYPED }); |
michael@0 | 51 | }, |
michael@0 | 52 | ]); |