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 Certified and packaged apps should be able to declare assertion audience.
10 https://bugzilla.mozilla.org/show_bug.cgi?id=947374
11 -->
12 <head>
13 <meta charset="utf-8">
14 <title>Test app for bug 947374</title>
15 </head>
17 <body>
18 <div id='test'>
19 <script type="application/javascript;version=1.8">
21 function postResults(message) {
22 window.realParent.postMessage(JSON.stringify(message), "*");
23 }
25 function onready() {
26 navigator.mozId.request();
27 }
29 function onlogin(backedAssertion) {
30 postResults({success: true, backedAssertion: backedAssertion});
31 }
33 function onerror(error) {
34 postResults({success: false, error: error});
35 }
37 onmessage = function(event) {
38 navigator.mozId.watch({
39 wantIssuer: "firefox-accounts",
40 audience: event.data.audience,
41 onready: onready,
42 onlogin: onlogin,
43 onerror: onerror,
45 // onlogout will actually be called every time watch() is invoked,
46 // because fxa will find no signed-in user and so trigger logout.
47 // For this test, though, we don't care and just ignore logout.
48 onlogout: function () {},
49 });
50 };
52 </script>
53 </div>
54 </body>
55 </html>