Home

# Class goog.net.BrowserTestChannel

Encapsulates the logic for a single BrowserTestChannel.

Instance Method Summary
| `abort()` Aborts the test channel.
| `checkBlockedCallback_(boolean succeeded)` Callback for testLoadImageWithRetries to check if browser channel is blocked.
| `checkBlocked_()` Checks to see whether the channel is blocked. This is for implementing the feature that allows network administrators to block Gmail Chat. The strategy to determine if we're blocked is to try to load an image off a special subdomain that network administrators will block access to if they are trying to block chat. For Gmail Chat, the subdomain is chatenabled.mail.google.com.
| `checkForEarlyNonBuffered_() ⇒ boolean`
| `connect(string path)` Starts the test channel. This initiates connections to the server.
| `connectStage2_()` Begins the second stage of the test channel where we test to see if we're behind a buffering proxy. The server sends back a multi-chunked response with the first chunk containing the content '1' and then two seconds later sending the second chunk containing the content '2'. Depending on how we receive the content, we can tell if we're behind a buffering proxy.
| `createXhrIo(?string hostPrefix) ⇒ !goog.net.XhrIo` Factory method for XhrIo objects.
| `getLastStatusCode() ⇒ number` Returns the last status code received for a request.
| `isActive(?goog.net.BrowserChannel browserChannel) ⇒ boolean` Gets whether this channel is currently active. This is used to determine the length of time to wait before retrying.
| `isClosed() ⇒ boolean` Returns whether the test channel is closed. The ChannelRequest object expects this method to be implemented on its handler.
| `onRequestComplete(?goog.net.ChannelRequest req)` Callback from ChannelRequest that indicates a request has completed.
| `onRequestData(?goog.net.ChannelRequest req, string responseText)` Callback from ChannelRequest for when new data is received
| `setExtraHeaders(?Object extraHeaders)` Sets extra HTTP headers to add to all the requests sent to the server.
| `shouldUseSecondaryDomains() ⇒ boolean`