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