events.eventTargetTester

Classes


Public Protected Private

Enumerations

goog.events.eventTargetTester.KeyType :
The type of key returned by key-returning functions (listen).
Constants:
NUMBER
No description.
UNDEFINED
No description.
Code »

Global Functions

goog.events.eventTargetTester.setUp(listenableFactoryFnlistenFnunlistenFnunlistenByKeyFnlistenOnceFndispatchEventFnremoveAllFngetListenersFngetListenerFnhasListenerFnlistenKeyTypeunlistenFnReturnTypeobjectListenerSupported)
Setup step for the test functions. This needs to be called from the test setUp.
Arguments:
listenableFactoryFn : function():!goog.events.Listenable
Function that will return a new Listenable instance each time it is called.
listenFn : Function
Function that, given the same signature as goog.events.listen, will add listener to the given event target.
unlistenFn : Function
Function that, given the same signature as goog.events.unlisten, will remove listener from the given event target.
unlistenByKeyFn : Function
Function that, given 2 parameters: src and key, will remove the corresponding listener.
listenOnceFn : Function
Function that, given the same signature as goog.events.listenOnce, will add a one-time listener to the given event target.
dispatchEventFn : Function
Function that, given the same signature as goog.events.dispatchEvent, will dispatch the event on the given event target.
removeAllFn : Function
Function that, given the same signature as goog.events.removeAll, will remove all listeners according to the contract of goog.events.removeAll.
getListenersFn : Function
Function that, given the same signature as goog.events.getListeners, will retrieve listeners.
getListenerFn : Function
Function that, given the same signature as goog.events.getListener, will retrieve the listener object.
hasListenerFn : Function
Function that, given the same signature as goog.events.hasListener, will determine whether listeners exist.
listenKeyType : goog.events.eventTargetTester.KeyType
The key type returned by listen call.
unlistenFnReturnType : goog.events.eventTargetTester.UnlistenReturnType
Whether we should check return value from unlisten call. If unlisten does not return a value, this should be set to false.
objectListenerSupported : boolean
Whether listener of type Object is supported.
code »
goog.events.eventTargetTester.tearDown()
Teardown step for the test functions. This needs to be called from test teardown.
code »

Global Properties

goog.events.eventTargetTester.ALREADY_CHECKED_PROP :
Expando property used on "listener" function to determine if a listener has already been checked. This is what allows us to implement assertNoOtherListenerIsCalled.
Code »
goog.events.eventTargetTester.MAX_ :
The maximum number of initialized event targets (in eventTargets array) and listeners (in listeners array).
Code »
goog.events.eventTargetTester.NUM_CALLED_PROP :
Expando property used on "listener" function to record the number of times it has been called the last time assertListenerIsCalled is done. This allows us to verify that it has not been called more times in assertNoOtherListenerIsCalled.
Code »
goog.events.eventTargetTester.UnlistenReturnType :
The type of unlisten function's return value.
Code »

Package events

Package Reference