1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xul/templates/tests/chrome/test_tmpl_storage_rule.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,59 @@ 1.4 +<?xml version="1.0"?> 1.5 +<?xml-stylesheet href="chrome://global/skin" type="text/css"?> 1.6 +<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> 1.7 + 1.8 +<!-- 1.9 + storage listbox with rule 1.10 +--> 1.11 + 1.12 +<window title="XUL Template Tests" width="500" height="600" 1.13 + onload="test_template();" 1.14 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.15 + <script type="application/javascript" 1.16 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.17 + 1.18 + <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/> 1.19 + 1.20 + <data id="output"> 1.21 + <listitem anyid="true" label="Gorilla"/> 1.22 + <listitem anyid="true" label="Nine-banded Armadillo"/> 1.23 + <listitem anyid="true" label="Polar Bear"/> 1.24 + <listitem anyid="true" label="aardvark"/> 1.25 + </data> 1.26 + 1.27 +<script src="templates_shared.js"/> 1.28 + 1.29 +<script> 1.30 +<![CDATA[ 1.31 + 1.32 +SimpleTest.waitForExplicitFinish(); 1.33 +copyToProfile('animals.sqlite'); 1.34 + 1.35 +var testid ="storage listbox with rule"; 1.36 +var queryType = "storage"; 1.37 +var isTreeBuilder = false; 1.38 +var needsOpen = false; 1.39 +var notWorkingYet = false; 1.40 +var notWorkingYetDynamic = false; 1.41 +var expectedOutput = document.getElementById("output"); 1.42 + 1.43 +var changes = []; 1.44 +]]> 1.45 +</script> 1.46 + 1.47 +<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root" 1.48 + flex="1" rows="8" 1.49 + datasources="profile:animals.sqlite" ref="." querytype="storage"> 1.50 + <template> 1.51 + <query> 1.52 + SELECT * FROM animals WHERE species_id = 5 ORDER BY name 1.53 + </query> 1.54 + <rule> 1.55 + <where subject="?id" rel="greater" value="10"/> 1.56 + <action> 1.57 + <listitem uri="?" label="?name" /> 1.58 + </action> 1.59 + </rule> 1.60 + </template> 1.61 +</listbox> 1.62 +</window>