Class for unit testing code that uses setTimeout and clearTimeout.
NOTE: If you are using MockClock to test code that makes use of
goog.fx.Animation, then you must either:
1. Install and dispose of the MockClock in setUpPage() and tearDownPage()
respectively (rather than setUp()/tearDown()).
or
2. Ensure that every test clears the animation queue by calling
mockClock.tick(x) at the end of each test function (where `x` is large
enough to complete all animations).
Otherwise, if any animation is left pending at the time that
MockClock.dispose() is called, that will permanently prevent any future
animations from playing on the page.
PublicProtectedPrivate
Global Functions
goog.testing.MockClock.insert_(timeout, queue)
Inserts a timer descriptor into a descending-order queue.
Later-inserted duplicates appear at lower indices. For example, the
asterisk in (5,4,*,3,2,1) would be the insertion point for 3.