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 containment attribute
7 -->
9 <window title="XUL Template Tests" width="500" height="600"
10 onload="test_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" unordered="true">
18 <checkbox step="-1" id="http://www.some-fictitious-zoo.com/arachnids/tarantula" label="Tarantula"/>
19 <checkbox step="2" id="http://www.some-fictitious-zoo.com/mammals/lion" label="Lion"/>
20 <checkbox id="http://www.some-fictitious-zoo.com/reptiles/anaconda" label="Anaconda"/>
21 <checkbox id="http://www.some-fictitious-zoo.com/reptiles/chameleon" label="Chameleon"/>
22 <checkbox id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
23 </data>
25 <script src="templates_shared.js"/>
27 <script>
28 <![CDATA[
29 SimpleTest.waitForExplicitFinish();
31 var testid ="containment attribute";
32 var queryType = "rdf";
33 var isTreeBuilder = false;
34 var needsOpen = false;
35 var notWorkingYet = false;
36 var notWorkingYetDynamic = false;
37 var expectedOutput = document.getElementById("output");
39 var changes = [
40 // step 1
41 function(targetds, root) {
42 targetds.Unassert(RDF.GetResource(ZOO_NS + 'humans/robert'),
43 RDF.GetResource(ZOO_NS + 'rdf#favoriteAnimal'),
44 RDF.GetResource(ZOO_NS + 'arachnids/tarantula'), true);
45 },
46 // step 2
47 function(targetds, root) {
48 targetds.Assert(RDF.GetResource(ZOO_NS + 'humans/robert'),
49 RDF.GetResource(ZOO_NS + 'rdf#favoriteAnimal'),
50 RDF.GetResource(ZOO_NS + 'mammals/lion'), true);
51 }
52 ];
53 ]]>
54 </script>
56 <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root" datasources="rdf:null" ref="http://www.some-fictitious-zoo.com/humans/robert" containment="http://www.some-fictitious-zoo.com/rdf#favoriteAnimal">
57 <template id="template">
58 <rule id="rule">
59 <conditions>
60 <content uri="?uri"/>
61 <member container="?uri" child="?child"/>
62 <triple subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?name"/>
63 </conditions>
64 <action>
65 <checkbox uri="?child" label="?name"/>
66 </action>
67 </rule>
68 </template>
69 </vbox>
71 </window>