runner.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <html>
  2. <!--
  3. NOTE: we are INTENTIONALLY in quirks mode. It makes it much easier to
  4. get a "full screen" UI w/ straightforward CSS.
  5. -->
  6. <!--
  7. // TODO: implement global progress bar
  8. // TODO: provide a UI for prompted tests
  9. -->
  10. <head>
  11. <title>The Dojo Unit Test Harness, $Rev$</title>
  12. <script type="text/javascript">
  13. window.dojoUrl = "../../dojo/dojo.js";
  14. window.testUrl = "";
  15. window.testModule = "";
  16. // parse out our test URL and our Dojo URL from the query string
  17. var qstr = window.location.search.substr(1);
  18. if(qstr.length){
  19. var qparts = qstr.split("&");
  20. for(var x=0; x<qparts.length; x++){
  21. var tp = qparts[x].split("=");
  22. if(tp[0] == "dojoUrl"){
  23. window.dojoUrl = tp[1];
  24. }
  25. if(tp[0] == "testUrl"){
  26. window.testUrl = tp[1];
  27. }
  28. if(tp[0] == "testModule"){
  29. window.testModule = tp[1];
  30. }
  31. }
  32. }
  33. document.write("<scr"+"ipt type='text/javascript' djConfig='isDebug: true' src='"+dojoUrl+"'></scr"+"ipt>");
  34. </script>
  35. <script type="text/javascript">
  36. try{
  37. dojo.require("doh.runner");
  38. }catch(e){
  39. document.write("<scr"+"ipt type='text/javascript' src='runner.js'></scr"+"ipt>");
  40. document.write("<scr"+"ipt type='text/javascript' src='_browserRunner.js'></scr"+"ipt>");
  41. }
  42. if(testUrl.length){
  43. document.write("<scr"+"ipt type='text/javascript' src='"+testUrl+".js'></scr"+"ipt>");
  44. }
  45. </script>
  46. <style type="text/css">
  47. @import "../../dojo/resources/dojo.css";
  48. /*
  49. body {
  50. margin: 0px;
  51. padding: 0px;
  52. font-size: 13px;
  53. color: #292929;
  54. font-family: Myriad, Lucida Grande, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
  55. *font-size: small;
  56. *font: x-small;
  57. }
  58. th, td {
  59. font-size: 13px;
  60. color: #292929;
  61. font-family: Myriad, Lucida Grande, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
  62. font-weight: normal;
  63. }
  64. * body {
  65. line-height: 1.25em;
  66. }
  67. table {
  68. border-collapse: collapse;
  69. }
  70. */
  71. #testLayout {
  72. position: relative;
  73. left: 0px;
  74. top: 0px;
  75. width: 100%;
  76. height: 100%;
  77. border: 1px solid black;
  78. border: 0px;
  79. }
  80. .tabBody {
  81. margin: 0px;
  82. padding: 0px;
  83. /*
  84. border: 1px solid black;
  85. */
  86. background-color: #DEDEDE;
  87. border: 0px;
  88. width: 100%;
  89. height: 100%;
  90. position: absolute;
  91. left: 0px;
  92. top: 0px;
  93. overflow: auto;
  94. }
  95. #logBody {
  96. padding-left: 5px;
  97. padding-top: 5px;
  98. font-family: Monaco, monospace;
  99. font-size: 11px;
  100. white-space: pre;
  101. }
  102. #progressOuter {
  103. background:#e9e9e9 url("http://svn.dojotoolkit.org/dojo/dijit/trunk/themes/tundra/dojoTundraGradientBg.png") repeat-x 0 0;
  104. /*
  105. border-color: #e8e8e8;
  106. */
  107. }
  108. #progressInner {
  109. background: blue url("http://svn.dojotoolkit.org/dojo/dijit/trunk/themes/tundra/bar.gif") repeat-x 0 0;
  110. width: 0%;
  111. position: relative;
  112. left: 0px;
  113. top: 0px;
  114. height: 100%;
  115. }
  116. #play, #pause {
  117. font-family: Webdings;
  118. font-size: 1.4em;
  119. border: 1px solid #DEDEDE;
  120. cursor: pointer;
  121. padding-right: 0.5em;
  122. }
  123. .header {
  124. border: 1px solid #DEDEDE;
  125. }
  126. button.tab {
  127. border-width: 1px 1px 0px 1px;
  128. border-style: solid;
  129. border-color: #DEDEDE;
  130. margin-right: 5px;
  131. }
  132. #testListContainer {
  133. /*
  134. border: 1px solid black;
  135. */
  136. position: relative;
  137. height: 99%;
  138. width: 100%;
  139. overflow: auto;
  140. }
  141. #testList {
  142. border-collapse: collapse;
  143. position: absolute;
  144. left: 0px;
  145. width: 100%;
  146. }
  147. #testList > tbody > tr > td {
  148. border-bottom: 1px solid #DEDEDE;
  149. border-right : 1px solid #DEDEDE;
  150. padding: 3px;
  151. }
  152. #testListHeader th {
  153. border-bottom: 1px solid #DEDEDE;
  154. border-right : 1px solid #DEDEDE;
  155. padding: 3px;
  156. font-weight: bolder;
  157. font-style: italic;
  158. }
  159. #toggleButtons {
  160. float: left;
  161. background-color: #DEDEDE;
  162. }
  163. tr.inProgress {
  164. background-color: #85afde;
  165. }
  166. tr.success {
  167. background-color: #7cdea7;
  168. }
  169. tr.failure {
  170. background-color: #de827b;
  171. }
  172. </style>
  173. </head>
  174. <body>
  175. <table id="testLayout" cellpadding="0" cellspacing="0" style="margin: 0;">
  176. <tr valign="top" height="40">
  177. <td colspan="2" id="logoBar">
  178. <h3 style="margin: 5px 5px 0px 5px; float: left;">D.O.H.: The Dojo Objective Harness</h3>
  179. <img src="small_logo.png" height="40" style="margin: 0px 5px 0px 5px; float: right;">
  180. <span style="margin: 10px 5px 0px 5px; float: right;">
  181. <input type="checkbox" id="audio" name="audio">
  182. <label for="audio">sounds?</label>
  183. </span>
  184. </td>
  185. </tr>
  186. <!--
  187. <tr valign="top" height="10">
  188. <td colspan="2" id="progressOuter">
  189. <div id="progressInner">blah</div>
  190. </td>
  191. </tr>
  192. -->
  193. <tr valign="top" height="30">
  194. <td width="30%" class="header">
  195. <span id="toggleButtons" onclick="doh.togglePaused();">
  196. <button id="play">&#052;</button>
  197. <button id="pause" style="display: none;">&#059;</button>
  198. </span>
  199. <span id="runningStatus">
  200. <span id="pausedMsg">Stopped</span>
  201. <span id="playingMsg" style="display: none;">Tests Running</span>
  202. </span>
  203. </td>
  204. <td width="*" class="header" valign="bottom">
  205. <button class="tab" onclick="showTestPage();">Test Page</button>
  206. <button class="tab" onclick="showLogPage();">Log</button>
  207. </td>
  208. </tr>
  209. <tr valign="top" style="border: 0; padding: 0; margin: 0;">
  210. <td height="100%" style="border: 0; padding: 0; margin: 0;">
  211. <div id="testListContainer">
  212. <table cellpadding="0" cellspacing="0" border="0"
  213. width="100%" id="testList" style="margin: 0;">
  214. <thead>
  215. <tr id="testListHeader" style="border: 0; padding: 0; margin: 0;" >
  216. <th>&nbsp;</th>
  217. <th width="20">
  218. <input type="checkbox" checked
  219. onclick="toggleRunAll();">
  220. </th>
  221. <th width="*" style="text-align: left;">test</th>
  222. <th width="50">time</th>
  223. </tr>
  224. </thead>
  225. <tbody valign="top">
  226. <tr id="groupTemplate" style="display: none;">
  227. <td style="font-family: Webdings; width: 15px;">&#052;</td>
  228. <td>
  229. <input type="checkbox" checked>
  230. </td>
  231. <td>group name</td>
  232. <td>10ms</td>
  233. </tr>
  234. <tr id="testTemplate" style="display: none;">
  235. <td>&nbsp;</td>
  236. <td>&nbsp;</td>
  237. <td style="padding-left: 20px;">test name</td>
  238. <td>10ms</td>
  239. </tr>
  240. </tbody>
  241. </table>
  242. </div>
  243. </td>
  244. <td>
  245. <div style="position: relative; width: 99%; height: 100%; top: 0px; left: 0px;">
  246. <div class="tabBody"
  247. style="z-index: 1;">
  248. <pre id="logBody"></pre>
  249. </div>
  250. <iframe id="testBody" class="tabBody"
  251. style="z-index: 0;"></iframe>
  252. <!--
  253. src="http://redesign.dojotoolkit.org"></iframe>
  254. -->
  255. </div>
  256. </td>
  257. </tr>
  258. </table>
  259. <span id="hiddenAudio"></span>
  260. </body>
  261. </html>