Home

# Class goog.net.NetworkTester

Creates an instance of goog.net.NetworkTester which can be used to test for internet connectivity by seeing if an image can be loaded from google.com. It can also be tested with other URLs.

Instance Method Summary
| `cleanupCallbacks_()` Cleans up the handlers and timer associated with the image.
| `getNumRetries() ⇒ number` Returns the numer of retries to attempt.
| `getPauseBetweenRetries() ⇒ number` Returns the pause between retries in milliseconds.
| `getTimeout() ⇒ number` Returns the timeout in milliseconds.
| `getUri() ⇒ ?goog.Uri` Returns the uri to use for the test.
| `isRunning() ⇒ boolean` Returns whether the tester is currently running.
| `onImageAbort_()` Callback for the image load being aborted.
| `onImageError_()` Callback for the image failing to load.
| `onImageLoad_()` Callback for the image successfully loading.
| `onImageTimeout_()` Callback for the image load timing out.
| `onPauseFinished_()` Callback for the pause between retry timer.
| `onResult(boolean succeeded)` Handles a successful or failed result.
| `setNumRetries(number retries)` Sets the timeout in milliseconds.
| `setPauseBetweenRetries(number pauseMs)` Sets the pause between retries in milliseconds.
| `setTimeout(number timeoutMs)` Sets the timeout in milliseconds.
| `setUri(?goog.Uri uri)` Sets the uri to use for the test.
| `start()` Starts the process of testing the network.
| `startNextAttempt_()` Starts the next attempt to load an image.
| `stop()` Stops the testing of the network. This is a noop if not running.

Static Method Summary
| `getNavigatorOffline_() ⇒ boolean`