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"?>
5 <!--
6 storage listbox with dynamic query parameters
7 -->
9 <window title="XUL Template Tests" width="500" height="600"
10 onload="test_storage_template();"
11 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
12 <script type="application/javascript"
13 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
15 <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
17 <data id="output"/>
19 <data id="rebuilt-output">
20 <listitem anyid="true" label="Barn Owl"/>
21 <listitem anyid="true" label="Emu"/>
22 <listitem anyid="true" label="Raven"/>
23 </data>
25 <script src="templates_shared.js"/>
27 <script>
28 <![CDATA[
29 SimpleTest.expectAssertions(1, 2);
31 SimpleTest.waitForExplicitFinish();
33 copyToProfile('animals.sqlite');
35 function test_storage_template()
36 {
37 var root = document.getElementById("root");
38 expectedOutput = document.getElementById("output");
39 checkResults(root, 0);
41 document.getElementById("species-id").textContent = '2';
42 root.builder.addListener(myBuilderListener);
43 root.builder.rebuild();
44 }
46 var myBuilderListener = {
48 willRebuild: function(aBuilder) {
50 },
51 didRebuild: function (aBuilder) {
52 var root = document.getElementById("root");
53 expectedOutput = document.getElementById("rebuilt-output");
54 checkResults(root, 0);
55 SimpleTest.finish();
56 }
57 }
59 var testid ="storage listbox with dynamic query parameters";
60 var queryType = "storage";
61 var isTreeBuilder = false;
62 var needsOpen = false;
63 var notWorkingYet = false;
64 var notWorkingYetDynamic = false;
65 var expectedOutput = document.getElementById("output");
67 var changes = [];
68 ]]>
69 </script>
71 <listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
72 flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
73 <template>
74 <query>
75 SELECT * FROM animals WHERE species_id = :spec ORDER BY name
76 <param id="species-id" name="spec" type="int32" />
77 </query>
78 <action>
79 <listitem uri="?" label="?name"/>
80 </action>
81 </template>
82 </listbox>
86 </window>