content/xul/templates/tests/chrome/test_tmpl_storage_rule.xul

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:45b17f39fef3
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 <!--
6 storage listbox with rule
7 -->
8
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>
14
15 <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
16
17 <data id="output">
18 <listitem anyid="true" label="Gorilla"/>
19 <listitem anyid="true" label="Nine-banded Armadillo"/>
20 <listitem anyid="true" label="Polar Bear"/>
21 <listitem anyid="true" label="aardvark"/>
22 </data>
23
24 <script src="templates_shared.js"/>
25
26 <script>
27 <![CDATA[
28
29 SimpleTest.waitForExplicitFinish();
30 copyToProfile('animals.sqlite');
31
32 var testid ="storage listbox with rule";
33 var queryType = "storage";
34 var isTreeBuilder = false;
35 var needsOpen = false;
36 var notWorkingYet = false;
37 var notWorkingYetDynamic = false;
38 var expectedOutput = document.getElementById("output");
39
40 var changes = [];
41 ]]>
42 </script>
43
44 <listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
45 flex="1" rows="8"
46 datasources="profile:animals.sqlite" ref="." querytype="storage">
47 <template>
48 <query>
49 SELECT * FROM animals WHERE species_id = 5 ORDER BY name
50 </query>
51 <rule>
52 <where subject="?id" rel="greater" value="10"/>
53 <action>
54 <listitem uri="?" label="?name" />
55 </action>
56 </rule>
57 </template>
58 </listbox>
59 </window>

mercurial