/toolkit/content/tests/chrome/test_tree_hier.xul

http://github.com/zpao/v8monkey · Unknown · 136 lines · 129 code · 7 blank · 0 comment · 0 complexity · 744402fcdebf1a5d4173c1f9607ac8cc MD5 · raw file

  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. XUL Widget Test for hierarchical tree
  6. -->
  7. <window title="Hierarchical Tree" width="500" height="600"
  8. onload="setTimeout(testtag_tree, 0, 'tree-hier', 'treechildren-hier', 'multiple', '', 'hierarchical tree');"
  9. xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  10. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  11. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
  12. <script src="tree_shared.js"/>
  13. <tree id="tree-hier" rows="4">
  14. <treecols>
  15. <treecol id="name" label="Name" primary="true"
  16. sort="label" properties="one two" flex="1"/>
  17. <treecol id="address" label="Address" flex="2"/>
  18. <treecol id="planet" label="Planet" flex="1"/>
  19. <treecol id="gender" label="Gender" flex="1" cycler="true"/>
  20. </treecols>
  21. <treechildren id="treechildren-hier">
  22. <treeitem>
  23. <treerow properties="firstrow">
  24. <treecell label="Mary" value="mary" properties="firstname"/>
  25. <treecell label="206 Garden Avenue" value="206ga"/>
  26. <treecell label="Earth"/>
  27. <treecell label="Female" value="f"/>
  28. </treerow>
  29. </treeitem>
  30. <treeitem>
  31. <treerow>
  32. <treecell/>
  33. <treecell value="19ms"/>
  34. <treecell label="Earth"/>
  35. <treecell label="Male" value="m"/>
  36. </treerow>
  37. </treeitem>
  38. <treeitem container="true">
  39. <treerow>
  40. <treecell label="Sarah"/>
  41. <treecell label="702 Fern Avenue" editable="false"/>
  42. <treecell label="Saturn"/>
  43. <treecell label="Female" value="f"/>
  44. </treerow>
  45. <treechildren>
  46. <treeitem>
  47. <treerow>
  48. <treecell label="Mary"/>
  49. <treecell label="206 Garden Avenue"/>
  50. <treecell label="Female" value="f"/>
  51. <treecell label="Neptune"/>
  52. </treerow>
  53. </treeitem>
  54. <treeitem>
  55. <treerow>
  56. <treecell label="Chris"/>
  57. <treecell label="19 Marion Street"/>
  58. <treecell label="Omicron Persei 8"/>
  59. <treecell label="Male" value="m"/>
  60. </treerow>
  61. </treeitem>
  62. <treeitem>
  63. <treerow>
  64. <treecell label="Sarah"/>
  65. <treecell label="702 Fern Avenue" editable="false"/>
  66. <treecell label="Earth"/>
  67. <treecell label="Female" value="f"/>
  68. </treerow>
  69. </treeitem>
  70. <treeitem>
  71. <treerow>
  72. <treecell label="John"/>
  73. <treecell label="99 Westminster Avenue"/>
  74. <treecell label="Neptune"/>
  75. <treecell label="Male" value="m"/>
  76. </treerow>
  77. </treeitem>
  78. </treechildren>
  79. </treeitem>
  80. <treeitem>
  81. <treerow>
  82. <treecell label="John"/>
  83. <treecell label="99 Westminster Avenue"/>
  84. <treecell/>
  85. <treecell label="Male" value="m"/>
  86. </treerow>
  87. </treeitem>
  88. <treeitem>
  89. <treerow>
  90. <treecell label="Mary"/>
  91. <treecell label="206 Garden Avenue" selectable="false"/>
  92. <treecell label=""/>
  93. <treecell label="Female" value="f"/>
  94. </treerow>
  95. </treeitem>
  96. <treeitem>
  97. <treerow>
  98. <treecell label="Chris"/>
  99. <treecell label="19 Marion Street"/>
  100. <treecell label="Neptune"/>
  101. <treecell label="Male" value="m"/>
  102. </treerow>
  103. </treeitem>
  104. <treeitem>
  105. <treerow>
  106. <treecell label="Sarah"/>
  107. <treecell label="702 Fern Avenue"/>
  108. <treecell label="Earth"/>
  109. <treecell label="Female" value="f"/>
  110. </treerow>
  111. </treeitem>
  112. <treeitem>
  113. <treerow>
  114. <treecell label="John"/>
  115. <treecell label="99 Westminster Avenue"/>
  116. <treecell label="Mars"/>
  117. <treecell label="Male" value="m"/>
  118. </treerow>
  119. </treeitem>
  120. </treechildren>
  121. </tree>
  122. <!-- test results are displayed in the html:body -->
  123. <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
  124. <!-- test code goes here -->
  125. <script type="application/javascript"><![CDATA[
  126. SimpleTest.waitForExplicitFinish();
  127. ]]>
  128. </script>
  129. </window>