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 function test() {
2 let osString = Cc["@mozilla.org/xre/app-info;1"].
3 getService(Ci.nsIXULRuntime).OS;
5 // this test is Linux-specific
6 if (osString != "Linux")
7 return;
9 let shell = Cc["@mozilla.org/browser/shell-service;1"].
10 getService(Ci.nsIShellService);
12 shell.setDefaultBrowser(true, false);
13 ok(shell.isDefaultBrowser(true, false), "we got here and are the default browser");
14 ok(shell.isDefaultBrowser(true, true), "we got here and are the default browser");
15 }