PageRenderTime 66ms CodeModel.GetById 62ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/tests/javascript-ignore/ignore.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 44 lines | 31 code | 5 blank | 8 comment | 11 complexity | 5a18789fbab9d03113f23fe06274ff80 MD5 | raw file
 1function createRequest() {
 2//#JSCOVERAGE_IF
 3  if (window.XMLHttpRequest) {
 4    return new XMLHttpRequest();
 5  }
 6  else if (window.ActiveXObject) {
 7    return new ActiveXObject('Msxml2.XMLHTTP');
 8  }
 9  else {
10    throw 'no XMLHttpRequest implementation available';
11  }
12}
13
14function createRequest2() {
15//#JSCOVERAGE_IF
16  if (window.XMLHttpRequest) {
17    return new XMLHttpRequest();
18  }
19
20//#JSCOVERAGE_IF ! window.XMLHttpRequest
21//#JSCOVERAGE_IF
22  if (window.ActiveXObject) {
23    return new ActiveXObject('Msxml2.XMLHTTP');
24  }
25
26//#JSCOVERAGE_IF 0
27  throw 'no XMLHttpRequest implementation available';
28//#JSCOVERAGE_ENDIF
29//#JSCOVERAGE_ENDIF
30}
31
32function log(s) {
33//#JSCOVERAGE_IF
34  if (window.console && window.console.log) {
35    console.log(s);
36  }
37  else if (window.opera && window.opera.postError) {
38    opera.postError(s);
39  }
40}
41
42var request = createRequest();
43var request2 = createRequest2();
44log('created requests');