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.
2 <!DOCTYPE HTML>
3 <html>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=913761
6 -->
7 <head>
8 <meta charset="utf-8">
9 <title>Test for Bug 913761 - basic support</title>
10 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=913761">Mozilla Bug 913761</a>
15 <script type="application/javascript">
17 function runTest() {
18 var transportChannel = new MessageChannel();
19 transportChannel.port1.onmessage = function (event) {
20 ok(true, 'Port Returned.');
21 var portToService = event.data.port;
22 portToService.onmessage = function (event) {
23 ok(true, "message received");
24 SimpleTest.finish();
25 };
26 portToService.postMessage('READY?');
27 }
29 var serviceChannel = new MessageChannel();
30 serviceChannel.port1.onmessage = function (event) {
31 if (event.data == 'READY?') {
32 this.postMessage('READY!');
33 }
34 }
36 transportChannel.port2.postMessage({ port: serviceChannel.port2}, [serviceChannel.port2]);
37 }
39 SimpleTest.waitForExplicitFinish();
40 SpecialPowers.pushPrefEnv({"set": [["dom.messageChannel.enabled", true]]}, runTest);
41 </script>
42 </body>
43 </html>