PageRenderTime 81ms CodeModel.GetById 70ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/doc/instrumented/script.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 65 lines | 64 code | 0 blank | 1 comment | 9 complexity | e72caf9ab6fe3d79b41a34353c32dec0 MD5 | raw file
 1/* automatically generated by JSCoverage - do not edit */
 2if (! top._$jscoverage) {
 3  top._$jscoverage = {};
 4}
 5var _$jscoverage = top._$jscoverage;
 6if (! _$jscoverage['script.js']) {
 7  _$jscoverage['script.js'] = [];
 8  _$jscoverage['script.js'][1] = 0;
 9  _$jscoverage['script.js'][2] = 0;
10  _$jscoverage['script.js'][3] = 0;
11  _$jscoverage['script.js'][4] = 0;
12  _$jscoverage['script.js'][6] = 0;
13  _$jscoverage['script.js'][7] = 0;
14  _$jscoverage['script.js'][9] = 0;
15  _$jscoverage['script.js'][10] = 0;
16  _$jscoverage['script.js'][12] = 0;
17  _$jscoverage['script.js'][13] = 0;
18  _$jscoverage['script.js'][15] = 0;
19  _$jscoverage['script.js'][16] = 0;
20  _$jscoverage['script.js'][17] = 0;
21  _$jscoverage['script.js'][18] = 0;
22  _$jscoverage['script.js'][19] = 0;
23}
24_$jscoverage['script.js'][1]++;
25function go(element) {
26  _$jscoverage['script.js'][2]++;
27  var message;
28  _$jscoverage['script.js'][3]++;
29  if (element.id === "radio1") {
30    _$jscoverage['script.js'][4]++;
31    message = "You selected the number 1.";
32  }
33  else {
34    _$jscoverage['script.js'][6]++;
35    if (element.id === "radio2") {
36      _$jscoverage['script.js'][7]++;
37      message = "You selected the number 2.";
38    }
39    else {
40      _$jscoverage['script.js'][9]++;
41      if (element.id === "radio3") {
42        _$jscoverage['script.js'][10]++;
43        message = "You selected the number 3.";
44      }
45      else {
46        _$jscoverage['script.js'][12]++;
47        if (element.id === "radio4") {
48          _$jscoverage['script.js'][13]++;
49          message = "You selected the number 4.";
50        }
51      }
52    }
53  }
54  _$jscoverage['script.js'][15]++;
55  var div = document.getElementById("request");
56  _$jscoverage['script.js'][16]++;
57  div.className = "black";
58  _$jscoverage['script.js'][17]++;
59  div = document.getElementById("result");
60  _$jscoverage['script.js'][18]++;
61  div.innerHTML = "<p>" + message + "</p>";
62  _$jscoverage['script.js'][19]++;
63  div.innerHTML += "<p>If you are running the instrumented version of this program, you can click the \"Summary\" tab to view a coverage report.</p>";
64}
65_$jscoverage['script.js'].source = ["<span class=\"k\">function</span> go<span class=\"k\">(</span>element<span class=\"k\">)</span> <span class=\"k\">{</span>","  <span class=\"k\">var</span> message<span class=\"k\">;</span>","  <span class=\"k\">if</span> <span class=\"k\">(</span>element<span class=\"k\">.</span>id <span class=\"k\">===</span> <span class=\"s\">'radio1'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","    message <span class=\"k\">=</span> <span class=\"s\">'You selected the number 1.'</span><span class=\"k\">;</span>","  <span class=\"k\">}</span>","  <span class=\"k\">else</span> <span class=\"k\">if</span> <span class=\"k\">(</span>element<span class=\"k\">.</span>id <span class=\"k\">===</span> <span class=\"s\">'radio2'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","    message <span class=\"k\">=</span> <span class=\"s\">'You selected the number 2.'</span><span class=\"k\">;</span>","  <span class=\"k\">}</span>","  <span class=\"k\">else</span> <span class=\"k\">if</span> <span class=\"k\">(</span>element<span class=\"k\">.</span>id <span class=\"k\">===</span> <span class=\"s\">'radio3'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","    message <span class=\"k\">=</span> <span class=\"s\">'You selected the number 3.'</span><span class=\"k\">;</span>","  <span class=\"k\">}</span>","  <span class=\"k\">else</span> <span class=\"k\">if</span> <span class=\"k\">(</span>element<span class=\"k\">.</span>id <span class=\"k\">===</span> <span class=\"s\">'radio4'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","    message <span class=\"k\">=</span> <span class=\"s\">'You selected the number 4.'</span><span class=\"k\">;</span>","  <span class=\"k\">}</span>","  <span class=\"k\">var</span> div <span class=\"k\">=</span> document<span class=\"k\">.</span>getElementById<span class=\"k\">(</span><span class=\"s\">'request'</span><span class=\"k\">);</span>","  div<span class=\"k\">.</span>className <span class=\"k\">=</span> <span class=\"s\">'black'</span><span class=\"k\">;</span>","  div <span class=\"k\">=</span> document<span class=\"k\">.</span>getElementById<span class=\"k\">(</span><span class=\"s\">'result'</span><span class=\"k\">);</span>","  div<span class=\"k\">.</span>innerHTML <span class=\"k\">=</span> <span class=\"s\">'&lt;p&gt;'</span> <span class=\"k\">+</span> message <span class=\"k\">+</span> <span class=\"s\">'&lt;/p&gt;'</span><span class=\"k\">;</span>","  div<span class=\"k\">.</span>innerHTML <span class=\"k\">+=</span> <span class=\"s\">'&lt;p&gt;If you are running the instrumented version of this program, you can click the \"Summary\" tab to view a coverage report.&lt;/p&gt;'</span><span class=\"k\">;</span>","<span class=\"k\">}</span>"];