1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xul/templates/tests/chrome/test_tmpl_bindingsmultiple.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,80 @@ 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 + bindings - multiple 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 + <button id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false" label="Arachnids "/> 1.22 + <button step="-2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah "/> 1.23 + <button step="2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah Yarmouth"/> 1.24 + <button step="-1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert Sanderson"/> 1.25 + <button step="1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert "/> 1.26 + <button id="http://www.some-fictitious-zoo.com/fish" container="true" empty="false" label="Fish "/> 1.27 + <button id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals "/> 1.28 + <button step="-1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert Sanderson"/> 1.29 + <button step="1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert "/> 1.30 + </data> 1.31 + 1.32 +<script src="templates_shared.js"/> 1.33 + 1.34 +<script> 1.35 +<![CDATA[ 1.36 +SimpleTest.waitForExplicitFinish(); 1.37 + 1.38 +var testid ="bindings - multiple"; 1.39 +var queryType = "rdf"; 1.40 +var isTreeBuilder = false; 1.41 +var needsOpen = false; 1.42 +var notWorkingYet = false; 1.43 +var notWorkingYetDynamic = false; 1.44 +var expectedOutput = document.getElementById("output"); 1.45 + 1.46 +var changes = [ 1.47 + // step 1 1.48 + function(targetds, root) { 1.49 + targetds.Unassert(RDF.GetResource(ZOO_NS + 'humans/robert'), 1.50 + RDF.GetResource(ZOO_NS + 'rdf#lastName'), 1.51 + RDF.GetLiteral('Sanderson'), true); 1.52 + }, 1.53 + // step 2 1.54 + function(targetds, root) { 1.55 + targetds.Assert(RDF.GetResource(ZOO_NS + 'humans/sarah'), 1.56 + RDF.GetResource(ZOO_NS + 'rdf#lastName'), 1.57 + RDF.GetLiteral('Yarmouth'), true); 1.58 + } 1.59 +]; 1.60 +]]> 1.61 +</script> 1.62 + 1.63 +<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root" datasources="rdf:null" ref="http://www.some-fictitious-zoo.com/all-animals"> 1.64 +<template> 1.65 +<query> 1.66 +<content uri="?uri"/> 1.67 +<member container="?uri" child="?child"/> 1.68 +</query> 1.69 +<rule> 1.70 +<bindings> 1.71 +<binding subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#keeper" object="?keeper"/> 1.72 +<binding subject="?keeper" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?keepername"/> 1.73 +<binding subject="?keeper" predicate="http://www.some-fictitious-zoo.com/rdf#lastName" object="?lastname"/> 1.74 +<binding subject="?child" predicate="http://www.some-fictitious-zoo.com/rdf#name" object="?name"/> 1.75 +</bindings> 1.76 +<action> 1.77 +<button uri="?child" label="?name ?keepername ?lastname"/> 1.78 +</action> 1.79 +</rule> 1.80 +</template> 1.81 +</vbox> 1.82 + 1.83 +</window>