runner.html 7.8 KB

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