testHandlerKeyDownForIme_imeOnOff() {
    setUserAgent('IE');
    initImeHandler();

    // Send a WIN_IME keyDown event and see whether IME mode turns on.
    fireImeKeySequence();
    assertImeMode();

    // Send keyDown events which should not turn off IME mode and see whether
    // IME mode holds on.
    fireKeySequence(KeyCodes.SHIFT);
    assertImeMode();

    fireKeySequence(KeyCodes.CTRL);
    assertImeMode();

    // Send a keyDown event with keyCode = ENTER and see whether IME mode
    // turns off.
    fireKeySequence(KeyCodes.ENTER);
    assertNotImeMode();

    assertEventsFired(eventTypes.START, eventTypes.END);
  }
Ensures that the IME mode turn on/off correctly.