PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/doc/example-jsunit/jsunit/app/main-data.html

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
HTML | 189 lines | 164 code | 25 blank | 0 comment | 0 complexity | 4f191e3bd2f1396145c803b28f7fc346 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <title>JsUnit main-data.html</title>
  7. <link rel="stylesheet" type="text/css" href="../css/jsUnitStyle.css">
  8. <script language="JavaScript" type="text/javascript" src="jsUnitCore.js"></script>
  9. <script language="JavaScript" type="text/javascript" src="jsUnitVersionCheck.js"></script>
  10. <script language="JavaScript" type="text/javascript">
  11. function pageLoaded() {
  12. giveFocusToTestFileNameField();
  13. }
  14. function giveFocusToTestFileNameField() {
  15. if (document.testRunnerForm.testFileName.type != "hidden")
  16. document.testRunnerForm.testFileName.focus();
  17. }
  18. function kickOffTests() {
  19. //
  20. // Check if Init was called by onload handler
  21. //
  22. if (typeof(top.testManager) == 'undefined') {
  23. top.init();
  24. }
  25. if (isBlank(top.testManager.getTestFileName())) {
  26. top.testManager.fatalError('No Test Page specified.');
  27. return;
  28. }
  29. top.testManager.setup();
  30. top.testManager._currentSuite().addTestPage(top.testManager.resolveUserEnteredTestFileName());
  31. top.tracer.initialize();
  32. var traceLevel = document.forms.testRunnerForm.traceLevel;
  33. if (traceLevel.value != '0')
  34. {
  35. var traceWindow = top.tracer._getTraceWindow();
  36. if (traceWindow) {
  37. traceWindow.focus();
  38. }
  39. else {
  40. top.testManager.fatalError('Tracing requires popup windows, and popups are blocked in your browser.\n\nPlease enable popups if you wish to use tracing.');
  41. }
  42. }
  43. top.testManager.start();
  44. }
  45. </script>
  46. </head>
  47. <body onload="pageLoaded();">
  48. <table width="100%" cellpadding="0" cellspacing="0" border="0" summary="jsUnit Information" bgcolor="#DDDDDD">
  49. <tr>
  50. <td width="1"><a href="http://www.jsunit.net" target="_blank"><img src="../images/logo_jsunit.gif" alt="JsUnit" border="0"/></a></td>
  51. <td width="50">&nbsp;</td>
  52. <th nowrap align="left">
  53. <h4>JsUnit <script language="javascript">document.write(JSUNIT_VERSION);</script> TestRunner</h4>
  54. <font size="-2"><i>Running on <script language="javascript" type="text/javascript">document.write(navigator.userAgent);</script>
  55. </i></font>
  56. </th>
  57. <td nowrap align="right" valign="middle">
  58. <font size="-2">
  59. <b><a href="http://www.jsunit.net/" target="_blank">www.jsunit.net</a></b>&nbsp;&nbsp;<br>
  60. </font>
  61. <a href="http://www.pivotalsf.com/" target="top">
  62. <img border="0" src="../images/powerby-transparent.gif" alt="Powered By Pivotal">
  63. </a>
  64. </td>
  65. </tr>
  66. </table>
  67. <form name="testRunnerForm" action="">
  68. <script type="text/javascript" language="javascript">
  69. if (!jsUnitGetParm('testpage')) {
  70. document.write("<p>Enter the filename of the Test Page to be run:</p>");
  71. } else {
  72. document.write("<br>");
  73. };
  74. </script>
  75. <table cellpadding="0" cellspacing="0" border="0" summary="Form for entering test case location">
  76. <tr>
  77. <td align="center" valign="middle">
  78. <script language="JavaScript" type="text/javascript">
  79. document.write(top.getDocumentProtocol());
  80. </script>
  81. </td>
  82. <td nowrap align="center" valign="bottom">
  83. &nbsp;
  84. <script language="JavaScript" type="text/javascript">
  85. var specifiedTestPage = jsUnitGetParm('testpage');
  86. if (specifiedTestPage) {
  87. var html = '<input type="hidden" name="testFileName" value="';
  88. var valueString = '';
  89. if ((top.getDocumentProtocol() == 'http://' || top.getDocumentProtocol() == 'https://') && jsUnitGetParm('testpage').indexOf('/') == 0)
  90. valueString += top.location.host;
  91. valueString += specifiedTestPage;
  92. var testParms = top.jsUnitConstructTestParms();
  93. if (testParms != '') {
  94. valueString += '?';
  95. valueString += testParms;
  96. }
  97. html += valueString;
  98. html += '">';
  99. html += valueString;
  100. document.write(html);
  101. } else {
  102. if (top.getDocumentProtocol() == 'file:///' && top.browserSupportsReadingFullPathFromFileField())
  103. document.write('<input type="file" name="testFileName" size="60">');
  104. else
  105. document.write('<input type="text" name="testFileName" size="60">');
  106. }
  107. </script>
  108. <input type="button" name="runButton" value="Run" onclick="kickOffTests()">
  109. <script type="text/javascript">
  110. function jscoverageWindow() {
  111. /*
  112. the path may have to be adjusted: it should point to the
  113. jscoverage.html file (relative to the jsunit/app
  114. directory)
  115. */
  116. window.open("../../jscoverage.html");
  117. }
  118. </script>
  119. <button onclick="jscoverageWindow();">Coverage report</button>
  120. </td>
  121. </tr>
  122. </table>
  123. <br>
  124. <hr>
  125. <table cellpadding="0" cellspacing="0" border="0" summary="Choose Trace Level">
  126. <tr>
  127. <td nowrap>Trace level:</td>
  128. <td><select name="traceLevel">
  129. <option value="0" selected>
  130. no tracing
  131. </option>
  132. <option value="1">
  133. warning (lowest)
  134. </option>
  135. <option value="2">
  136. info
  137. </option>
  138. <option value="3">
  139. debug (highest)
  140. </option>
  141. </select></td>
  142. <td>&nbsp;&nbsp;&nbsp;</td>
  143. <td><input type="checkbox" name="closeTraceWindowOnNewRun" checked></td>
  144. <td nowrap>Close old trace window on new run</td>
  145. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  146. <td nowrap>Page load timeout:</td>
  147. <td>&nbsp;
  148. <script language="javascript" type="text/javascript">
  149. document.write('<input type="text" size="2" name="timeout" value="' + top.jsUnitTestManager.TESTPAGE_WAIT_SEC + '">');
  150. </script>
  151. </td>
  152. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  153. <td nowrap>Setup page timeout:</td>
  154. <td>&nbsp;
  155. <script language="javascript" type="text/javascript">
  156. document.write('<input type="text" size="2" name="setUpPageTimeout" value="' + top.jsUnitTestManager.SETUPPAGE_TIMEOUT + '">');
  157. </script>
  158. </td>
  159. </tr>
  160. </table>
  161. <hr>
  162. </form>
  163. </body>
  164. </html>