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 <?xml version="1.0"?>
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 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
7 <window id="window" title="Subframe Origin Tests"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script type="application/javascript"
10 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
12 <iframe
13 style="margin-left:20px; margin-top:20px; min-height:300px; max-width:300px; max-height:300px; border:solid 1px black;"
14 src="frame_subframe_origin_subframe1.xul"></iframe>
15 <caption id="parentcap" label=""/>
17 <script>
19 // Fire a mouse move event aimed at this window, and check to be
20 // sure the client coords translate from widget to the dom correctly.
22 function runTests()
23 {
24 synthesizeMouse(document.getElementById("window"), 1, 2, { type: "mousemove" });
25 }
27 window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTests, window);
29 function mouseMove(e) {
30 var element = e.target;
31 var el = document.getElementById("parentcap");
32 el.label = "client: (" + e.clientX + "," + e.clientY + ")";
33 window.opener.wrappedJSObject.SimpleTest.is(e.clientX, 1, "mouse event clientX");
34 window.opener.wrappedJSObject.SimpleTest.is(e.clientY, 2, "mouse event clientY");
35 // fire the next test on the sub frame
36 frames[0].runTests();
37 }
39 window.addEventListener("mousemove",mouseMove, false);
41 </script>
42 </window>