var expectedFailures = new goog.testing.ExpectedFailures(); function tearDown() { expectedFailures.handleTearDown(); } function testSomethingThatBreaksInWebKit() { expectedFailures.expectFailureFor(goog.userAgent.WEBKIT); try { ... assert(somethingThatFailsInWebKit); ... } catch (e) { expectedFailures.handleException(e); } }
goog.testing.ExpectedFailures |
![]()
Register to expect failure for the given condition. Multiple calls to this
function act as a boolean OR. The first applicable message will be used.
Arguments:
|
code » | |||
No description.
Returns: string
A warning describing an expected failure that didn't occur.
|
code » | |||
![]()
Handle an exception, suppressing it if it is a unit test failure that we
expected.
Arguments:
|
code » | |||
![]()
Handle the tearDown phase of a test, alerting the user if an expected test
was not suppressed.
|
code » | |||
Determines if the given exception was expected.
|
code » | |||
![]()
Reset internal state.
|
code » | |||
![]()
Run the given function, catching any expected failures.
Arguments:
|
code » |
![]()
Sets up the debug console, if it isn't already set up.
|
code » |
The lazily created debugging console.
|
Code » |