table_test.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <html>
  2. </html>
  3. <html>
  4. <!--
  5. Copyright 2011 The Closure Library Authors. All Rights Reserved.
  6. Use of this source code is governed by the Apache License, Version 2.0.
  7. See the COPYING file for details.
  8. -->
  9. <head>
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  11. <meta charset="UTF-8" />
  12. <title>
  13. table.js Tests
  14. </title>
  15. <script src="../base.js">
  16. </script>
  17. <script>
  18. goog.require('goog.editor.TableTest');
  19. </script>
  20. <style>
  21. table {
  22. border:1px outset #777;
  23. margin-top: 1em;
  24. empty-cells: show;
  25. }
  26. td, th {
  27. border:1px inset #777;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <table id="test-basic">
  33. <tr>
  34. <th>
  35. Number
  36. </th>
  37. <th>
  38. Color
  39. </th>
  40. <th>
  41. Speed
  42. </th>
  43. </tr>
  44. <tr>
  45. <td>
  46. One
  47. </td>
  48. <td>
  49. Red
  50. </td>
  51. <td>
  52. 60
  53. </td>
  54. </tr>
  55. <tr>
  56. <td>
  57. Two
  58. </td>
  59. <td>
  60. Blue
  61. </td>
  62. <td>
  63. 75
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>
  68. Three
  69. </td>
  70. <td>
  71. Orange
  72. </td>
  73. <td>
  74. 88
  75. </td>
  76. </tr>
  77. </table>
  78. <table id="test-torture">
  79. <tr>
  80. <th rowspan="2">
  81. Left 0+1
  82. <br />
  83. &nbsp;
  84. </th>
  85. <th colspan="2">
  86. Middle, Right 0
  87. </th>
  88. </tr>
  89. <tr>
  90. <td colspan="2" rowspan="2">
  91. Middle, Right 1 + 2
  92. <br />
  93. &nbsp;
  94. </td>
  95. </tr>
  96. <tr>
  97. <th>
  98. Left 2
  99. </th>
  100. </tr>
  101. <tr>
  102. <th>
  103. Left 3
  104. </th>
  105. <td>
  106. Middle 3
  107. </td>
  108. <td>
  109. Right 3
  110. </td>
  111. </tr>
  112. <tr>
  113. <th colspan="3">
  114. Left, Middle, Right 4
  115. </th>
  116. </tr>
  117. <tr>
  118. <th colspan="2" rowspan="2">
  119. Left, Middle 5+6
  120. <br />
  121. &nbsp;
  122. </th>
  123. <td rowspan="4">
  124. Right 5+6+7+8
  125. </td>
  126. </tr>
  127. <tr>
  128. </tr>
  129. <tr>
  130. <th rowspan="2">
  131. Left 7+8
  132. </th>
  133. <td>
  134. Middle 7
  135. </td>
  136. </tr>
  137. <tr>
  138. <td>
  139. Middle 8
  140. </td>
  141. </tr>
  142. </table>
  143. <table id="test-nested">
  144. <tr>
  145. <td>
  146. One
  147. </td>
  148. <td>
  149. Two
  150. </td>
  151. <td>
  152. <table>
  153. <tr>
  154. <td>
  155. Nested cell 1
  156. </td>
  157. <td>
  158. Nested cell 2
  159. </td>
  160. </tr>
  161. <tr>
  162. <td>
  163. Nested cell 2
  164. </td>
  165. <td>
  166. Nested cell 3
  167. </td>
  168. </tr>
  169. </table>
  170. </td>
  171. </tr>
  172. <tr>
  173. <td>
  174. Four
  175. </td>
  176. <td>
  177. Five
  178. </td>
  179. <td>
  180. Six
  181. </td>
  182. </tr>
  183. </table>
  184. </body>
  185. </html>