testReconnectionDisabled() {
    // Construct the web socket and disable reconnection.
    webSocket = new NetWebSocket({autoReconnect: false});

    // Record how many times open is called.
    pr.set(webSocket, 'open', recordFunction(webSocket.open));

    // Open the web socket.
    webSocket.open(testUrl);
    assertEquals(0, webSocket.reconnectAttempt_);
    assertEquals(1, webSocket.open.getCallCount());
    assertFalse(webSocket.isOpen());

    // Simulate failure.
    /** @suppress {visibility} suppression added to enable type checking */
    const ws = webSocket.webSocket_;
    simulateCloseEvent(ws);
    assertFalse(webSocket.isOpen());
    assertEquals(0, webSocket.reconnectAttempt_);
    assertEquals(1, webSocket.open.getCallCount());

    // Make sure a reconnection doesn't happen.
    mockClock.tick(100000);
    assertEquals(0, webSocket.reconnectAttempt_);
    assertEquals(1, webSocket.open.getCallCount());
  }
@suppress {visibility,missingProperties,checkTypes} suppression added to
     enable type checking