testIe8StyleKeyHandlingInIe9DocumentMode() {
    userAgent.IE = true;
    userAgent.GECKO = false;
    userAgent.WEBKIT = false;
    userAgent.MAC = false;
    userAgent.WINDOWS = true;
    userAgent.LINUX = false;
    /** @suppress {checkTypes} suppression added to enable type checking */
    userAgent.VERSION = 9;  // Try IE9 in IE8 document mode.
    /**
     * @suppress {constantProperty} suppression added to enable type checking
     */
    userAgent.DOCUMENT_MODE = 8;

    assertIe8StyleKeyHandling();
  }
Tests the key handler for the IE 8 and lower behavior.