toolkit/content/tests/chrome/test_tree_hier.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/content/tests/chrome/test_tree_hier.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,136 @@
     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 +  XUL Widget Test for hierarchical tree
     1.9 +  -->
    1.10 +<window title="Hierarchical Tree" width="500" height="600"
    1.11 +        onload="setTimeout(testtag_tree, 0, 'tree-hier', 'treechildren-hier', 'multiple', '', 'hierarchical tree');"
    1.12 +        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.13 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>  
    1.14 +  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
    1.15 +
    1.16 +<script src="tree_shared.js"/>
    1.17 +
    1.18 +<tree id="tree-hier" rows="4">
    1.19 +  <treecols>
    1.20 +    <treecol id="name" label="Name" primary="true"
    1.21 +             sort="label" properties="one two" flex="1"/>
    1.22 +    <treecol id="address" label="Address" flex="2"/>
    1.23 +    <treecol id="planet" label="Planet" flex="1"/>
    1.24 +    <treecol id="gender" label="Gender" flex="1" cycler="true"/>
    1.25 +  </treecols>
    1.26 +  <treechildren id="treechildren-hier">
    1.27 +    <treeitem>
    1.28 +      <treerow properties="firstrow">
    1.29 +        <treecell label="Mary" value="mary" properties="firstname"/>
    1.30 +        <treecell label="206 Garden Avenue" value="206ga"/>
    1.31 +        <treecell label="Earth"/>
    1.32 +        <treecell label="Female" value="f"/>
    1.33 +      </treerow>
    1.34 +    </treeitem>
    1.35 +    <treeitem>
    1.36 +      <treerow>
    1.37 +        <treecell/>
    1.38 +        <treecell value="19ms"/>
    1.39 +        <treecell label="Earth"/>
    1.40 +        <treecell label="Male" value="m"/>
    1.41 +      </treerow>
    1.42 +    </treeitem>
    1.43 +    <treeitem container="true">
    1.44 +      <treerow>
    1.45 +        <treecell label="Sarah"/>
    1.46 +        <treecell label="702 Fern Avenue" editable="false"/>
    1.47 +        <treecell label="Saturn"/>
    1.48 +        <treecell label="Female" value="f"/>
    1.49 +      </treerow>
    1.50 +      <treechildren>
    1.51 +        <treeitem>
    1.52 +          <treerow>
    1.53 +            <treecell label="Mary"/>
    1.54 +            <treecell label="206 Garden Avenue"/>
    1.55 +            <treecell label="Female" value="f"/>
    1.56 +            <treecell label="Neptune"/>
    1.57 +          </treerow>
    1.58 +        </treeitem>
    1.59 +        <treeitem>
    1.60 +          <treerow>
    1.61 +            <treecell label="Chris"/>
    1.62 +            <treecell label="19 Marion Street"/>
    1.63 +            <treecell label="Omicron Persei 8"/>
    1.64 +            <treecell label="Male" value="m"/>
    1.65 +          </treerow>
    1.66 +        </treeitem>
    1.67 +        <treeitem>
    1.68 +          <treerow>
    1.69 +            <treecell label="Sarah"/>
    1.70 +            <treecell label="702 Fern Avenue" editable="false"/>
    1.71 +            <treecell label="Earth"/>
    1.72 +            <treecell label="Female" value="f"/>
    1.73 +          </treerow>
    1.74 +        </treeitem>
    1.75 +        <treeitem>
    1.76 +          <treerow>
    1.77 +            <treecell label="John"/>
    1.78 +            <treecell label="99 Westminster Avenue"/>
    1.79 +            <treecell label="Neptune"/>
    1.80 +            <treecell label="Male" value="m"/>
    1.81 +          </treerow>
    1.82 +        </treeitem>
    1.83 +      </treechildren>
    1.84 +    </treeitem>
    1.85 +    <treeitem>
    1.86 +      <treerow>
    1.87 +        <treecell label="John"/>
    1.88 +        <treecell label="99 Westminster Avenue"/>
    1.89 +        <treecell/>
    1.90 +        <treecell label="Male" value="m"/>
    1.91 +      </treerow>
    1.92 +    </treeitem>
    1.93 +    <treeitem>
    1.94 +      <treerow>
    1.95 +        <treecell label="Mary"/>
    1.96 +        <treecell label="206 Garden Avenue" selectable="false"/>
    1.97 +        <treecell label=""/>
    1.98 +        <treecell label="Female" value="f"/>
    1.99 +      </treerow>
   1.100 +    </treeitem>
   1.101 +    <treeitem>
   1.102 +      <treerow>
   1.103 +        <treecell label="Chris"/>
   1.104 +        <treecell label="19 Marion Street"/>
   1.105 +        <treecell label="Neptune"/>
   1.106 +        <treecell label="Male" value="m"/>
   1.107 +      </treerow>
   1.108 +    </treeitem>
   1.109 +    <treeitem>
   1.110 +      <treerow>
   1.111 +        <treecell label="Sarah"/>
   1.112 +        <treecell label="702 Fern Avenue"/>
   1.113 +        <treecell label="Earth"/>
   1.114 +        <treecell label="Female" value="f"/>
   1.115 +      </treerow>
   1.116 +    </treeitem>
   1.117 +    <treeitem>
   1.118 +      <treerow>
   1.119 +        <treecell label="John"/>
   1.120 +        <treecell label="99 Westminster Avenue"/>
   1.121 +        <treecell label="Mars"/>
   1.122 +        <treecell label="Male" value="m"/>
   1.123 +      </treerow>
   1.124 +    </treeitem>
   1.125 +  </treechildren>
   1.126 +</tree>
   1.127 +
   1.128 +  <!-- test results are displayed in the html:body -->
   1.129 +  <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
   1.130 +
   1.131 +  <!-- test code goes here -->
   1.132 +  <script type="application/javascript"><![CDATA[
   1.133 +
   1.134 +SimpleTest.waitForExplicitFinish();
   1.135 +
   1.136 +]]>
   1.137 +</script>
   1.138 +
   1.139 +</window>

mercurial