testRequestTimeoutWithUnexpectedException() {
    createChannelRequest();
    /** @suppress {visibility} suppression added to enable type checking */
    channelRequest.channel_.createXhrIo = functions.error('Weird error');

    try {
      channelRequest.xmlHttpGet(new Uri('some_uri'), true, null);
      fail('Expected error');
    } catch (e) {
      assertEquals('Weird error', e.message);
    }

    assertEquals(0, channelRequest.watchdogTimeoutCallCount);
    assertEquals(0, channelRequest.channel_.completedRequests.length);

    // Watchdog timeout.
    mockClock.tick(WATCHDOG_TIME);
    assertEquals(1, channelRequest.watchdogTimeoutCallCount);
    assertEquals(1, channelRequest.channel_.completedRequests.length);
    assertFalse(channelRequest.getSuccess());

    // Make sure no more timers are firing.
    mockClock.tick(ALL_DAY_MS);
    assertEquals(1, channelRequest.watchdogTimeoutCallCount);
    assertEquals(1, channelRequest.channel_.completedRequests.length);

    checkReachabilityEvents(0, 0, 1, 0);
  }
@suppress {strictMissingProperties,visibility} suppression added to enable
     type checking