()
| 201 | |
| 202 | // Test that the error constructor is not shown in the trace |
| 203 | function testCallerCensorship() { |
| 204 | var threw = false; |
| 205 | try { |
| 206 | FAIL; |
| 207 | } catch (e) { |
| 208 | assertEquals(-1, e.stack.indexOf('at new ReferenceError'), |
| 209 | "CallerCensorship contained new ReferenceError"); |
| 210 | threw = true; |
| 211 | } |
| 212 | assertTrue(threw, "CallerCensorship didn't throw"); |
| 213 | } |
| 214 | |
| 215 | // Test that the explicit constructor call is shown in the trace |
| 216 | function testUnintendedCallerCensorship() { |
no test coverage detected