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 href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
4 <!--
5 XUL Widget Test for label control="value"
6 -->
7 <window title="tabindex" width="500" height="600"
8 onload="runTests()"
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
10 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
13 <label id="lab" control="ctl"/>
14 <textbox id="ctl" value="Test"/>
15 <checkbox id="chk" value="Checkbox"/>
17 <body xmlns="http://www.w3.org/1999/xhtml">
18 <p id="display"></p>
19 <div id="content" style="display: none">
20 </div>
21 <pre id="test">
22 </pre>
23 </body>
25 <script>
26 <![CDATA[
28 SimpleTest.waitForExplicitFinish();
30 function runTests()
31 {
32 is($("lab").control, "ctl", "control");
33 is($("lab").labeledControlElement, $("ctl"), "labeledControlElement");
34 is($("ctl").labelElement, $("lab"), "labelElement");
35 is($("chk").labelElement.className, "checkbox-label", "labelElement");
37 SimpleTest.finish();
38 }
40 ]]>
42 </script>
44 </window>