(name, spec, run, opts, expectFail)
| 46 | } |
| 47 | |
| 48 | function testDoc(name, spec, run, opts, expectFail) { |
| 49 | if (!opts) opts = {}; |
| 50 | |
| 51 | return test("doc_" + name, function() { |
| 52 | var place = document.getElementById("testground"); |
| 53 | var editors = instantiateSpec(spec, place, opts); |
| 54 | var successful = false; |
| 55 | |
| 56 | try { |
| 57 | run.apply(null, editors); |
| 58 | successful = true; |
| 59 | } finally { |
| 60 | if (!successful || verbose) { |
| 61 | place.style.visibility = "visible"; |
| 62 | } else { |
| 63 | for (var i = 0; i < editors.length; ++i) |
| 64 | if (editors[i] instanceof CodeMirror) |
| 65 | place.removeChild(editors[i].getWrapperElement()); |
| 66 | } |
| 67 | } |
| 68 | }, expectFail); |
| 69 | } |
| 70 | |
| 71 | var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); |
| 72 |
no test coverage detected