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 <!--
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 -->
6 <!DOCTYPE html>
7 <html>
8 <!--
9 RPs have the correct callbacks for BrowserID or Firefox Accounts
10 https://bugzilla.mozilla.org/show_bug.cgi?id=945363
11 -->
12 <head>
13 <meta charset="utf-8">
14 <title>Test app for bug 945363</title>
15 </head>
17 <body>
18 <script type="application/javascript;version=1.7">
20 // This is a happy RP. It has the expected callbacks for BrowserID.
22 function postMessage(message) {
23 SpecialPowers.wrap(window).parent
24 .postMessage(JSON.stringify(message), "*");
25 }
27 let error = false;
29 window.addEventListener('load', function onLoad(event) {
30 window.removeEventListener('load', onLoad);
31 try {
32 navigator.mozId.watch({
33 onlogin: function() {},
34 });
35 } catch(ex) {
36 error = true;
37 }
38 postMessage({error: error});
39 }, false);
41 </script>
42 </body>
43 </html>