websocket_test.js
No description.

File Location

/goog/net/websocket_test.js


Public Protected Private

Global Functions

fibonacci(n) number
Computes the desired fibonacci number.
Arguments:
n : number
The nth desired fibonacci number.
Returns: number  The nth fibonacci number.
code »
fibonacciBackOff(attempt) number
Strategy for reconnection that backs off with the fibonacci pattern. It is offset by 5 seconds so the first attempt will happen after 5 seconds.
Arguments:
attempt : number
The number of reconnects since the last connection.
Returns: number  The amount of time to the next reconnect, in milliseconds.
code »
linearBackOff(attempt) number
Strategy for reconnection that backs off linearly with a 1 second offset.
Arguments:
attempt : number
The number of reconnects since the last connection.
Returns: number  The amount of time to the next reconnect, in milliseconds.
code »
originalOnClose()
No description.
code »
originalOnMessage()
No description.
code »
originalOnOpen()
No description.
code »
replacement()
No description.
code »
setUp()
No description.
code »
simulateCloseEvent(ws)
Simulates the browser firing the close event for the given web socket.
Arguments:
ws : MockWebSocket
The mock web socket.
code »
simulateOpenEvent(ws)
Simulates the browser firing the open event for the given web socket.
Arguments:
ws : MockWebSocket
The mock web socket.
code »
tearDown()
No description.
code »
testEntryPointRegistry()
No description.
code »
testErrorHandlerCalled()
No description.
code »
testExponentialBackOff()
No description.
code »
testOpenAndClose()
No description.
code »
testOpenInUnsupportingBrowserThrowsException()
No description.
code »
testOpenTwiceThrowsException()
No description.
code »
testOpenWithProtocol()
No description.
code »
testReconnectionDisabled()
No description.
code »
testReconnectionWithFailureAfterOpen()
No description.
code »
testReconnectionWithFailureOnFirstOpen()
No description.
code »
testSendWithoutOpeningThrowsException()
No description.
code »

Global Variables

originalOnError :
No description.
Code »
No description.
Code »
testProtocol :
No description.
Code »
testUrl :
No description.
Code »
webSocket : goog.net.WebSocket
No description.
Code »

Directory net

File Reference