testing.ContinuationTestCase.Step Extends goog.testing.TestCase.Test
Constructs a single step in a larger continuation test. Each step is similar to a typical TestCase test, except it may wait for an event or timeout to occur before running the test function.

Inheritance

Constructor

goog.testing.ContinuationTestCase.Step(namerefopt_scope)

Parameters

name : string
The test name.
ref : Function
The test function to run.
opt_scope : Object=
The object context to run the test in.

Instance Methods

Public Protected Private
clearTimeout()
Clears the current timeout if it is active.
code »
ref()
No description.
code »
setTimeout(funcduration)
Starts a timeout for this step. Each step may have only one timeout active at a time.
Arguments:
func : Function
The function to call after the timeout.
duration : number
The number of milliseconds to wait before invoking the function.
code »
execute()
Executes the test function.
code »

Instance Properties

constructor :
No description.
Code »
timeout_ :
Key to this step's timeout. If the step is waiting for an event, the timeout will be used as a kill timer. If the step is waiting
Code »
waiting :
Whether the step is currently waiting for a condition to continue. All new steps begin in wait state.
Code »
name :
The name of the test.
Code »
ref :
Reference to the test function.
Code »
scope :
Scope that the test function should be called in.
Code »

Static Properties

goog.testing.ContinuationTestCase.Step.protectedClearTimeout_ :
A saved reference to window.clearTimeout so that MockClock or other overrides don't affect continuation timeouts.
Code »
goog.testing.ContinuationTestCase.Step.protectedSetTimeout_ :
A saved reference to window.setTimeout so that MockClock or other overrides don't affect continuation timeouts.
Code »
goog.testing.ContinuationTestCase.Step.superClass_ :
No description.
Code »

Package testing.ContinuationTestCase

Package Reference