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 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=912103 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <meta charset="utf-8"> |
michael@0 | 8 | <title>Test for Bug </title> |
michael@0 | 9 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> |
michael@0 | 11 | <script type="application/javascript"> |
michael@0 | 12 | |
michael@0 | 13 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 14 | |
michael@0 | 15 | function runTest() { |
michael@0 | 16 | const Cc = Components.classes; |
michael@0 | 17 | const Ci = Components.interfaces; |
michael@0 | 18 | |
michael@0 | 19 | var dashboard = Cc['@mozilla.org/network/dashboard;1'] |
michael@0 | 20 | .getService(Ci.nsIDashboard); |
michael@0 | 21 | dashboard.enableLogging = true; |
michael@0 | 22 | |
michael@0 | 23 | var wsURI = "ws://mochi.test:8888/chrome/toolkit/content/tests/chrome/file_about_networking"; |
michael@0 | 24 | var websocket = new WebSocket(wsURI); |
michael@0 | 25 | |
michael@0 | 26 | websocket.addEventListener("open", function() { |
michael@0 | 27 | dashboard.requestWebsocketConnections(function(data) { |
michael@0 | 28 | var found = false; |
michael@0 | 29 | for (var i = 0; i < data.websockets.length; i++) { |
michael@0 | 30 | if (data.websockets[i].hostport == "mochi.test:8888") { |
michael@0 | 31 | found = true; |
michael@0 | 32 | break; |
michael@0 | 33 | } |
michael@0 | 34 | } |
michael@0 | 35 | isnot(found, false, "tested websocket entry not found"); |
michael@0 | 36 | websocket.close(); |
michael@0 | 37 | SimpleTest.finish(); |
michael@0 | 38 | }); |
michael@0 | 39 | }); |
michael@0 | 40 | } |
michael@0 | 41 | |
michael@0 | 42 | window.addEventListener("DOMContentLoaded", function run() { |
michael@0 | 43 | window.removeEventListener("DOMContentLoaded", run); |
michael@0 | 44 | runTest(); |
michael@0 | 45 | }); |
michael@0 | 46 | |
michael@0 | 47 | </script> |
michael@0 | 48 | </head> |
michael@0 | 49 | <body> |
michael@0 | 50 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=912103">Mozilla Bug </a> |
michael@0 | 51 | <p id="display"></p> |
michael@0 | 52 | <div id="content" style="display: none"> |
michael@0 | 53 | |
michael@0 | 54 | </div> |
michael@0 | 55 | <pre id="test"> |
michael@0 | 56 | </pre> |
michael@0 | 57 | </body> |
michael@0 | 58 | </html> |