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 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=944407
6 -->
7 <window title="Mozilla Bug 944407"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
11 <!-- test results are displayed in the html:body -->
12 <body xmlns="http://www.w3.org/1999/xhtml">
13 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=944407"
14 target="_blank">Mozilla Bug 944407</a>
15 </body>
17 <!-- test code goes here -->
18 <script type="application/javascript">
19 <![CDATA[
21 /** Test for XBL bindings with script disabled. **/
22 SimpleTest.waitForExplicitFinish();
23 const Cu = Components.utils;
24 Cu.import('resource://gre/modules/Services.jsm');
26 function go() {
28 // Disable javascript, and load the frame.
29 function loadFrame() {
30 ok(!Services.prefs.getBoolPref('javascript.enabled'), "Javascript should be disabled");
31 $('ifr').setAttribute('src', 'http://mochi.test:8888/tests/dom/xbl/test/file_bug944407.html');
32 }
33 SpecialPowers.pushPrefEnv({ set: [['javascript.enabled', false]] }, loadFrame);
34 }
36 function finish() {
37 SimpleTest.finish();
38 }
40 addLoadEvent(go);
41 ]]>
42 </script>
43 <iframe id='ifr' />
44 </window>