Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354219

Automate javax/swing/JComboBox/ComboPopupBug.java

XMLWordPrintable

    • b05
    • 23

      The fix for JDK-8322754 introduced a new manual test javax/swing/JComboBox/ComboPopupBug.java.

      This test can be automated easily. Use Robot to click the Close button (or invoke doClick() on EDT), then, while EDT is blocked by Thread.sleep in the Close button handler, use Robot to open the combo box. (The combo box could be read-only so that clicking anywhere opens it; otherwise, you can get the down button or just move mouse a few pixels to the left of the combo box right edge.)

      If IllegalComponentStateException is thrown, the test fails automatically (jtreg catches unhandled exceptions on EDT); if no exception is thrown, ensure EDT is released by posting a dummy event or another way, dispose of the frame and exit the main thread.

            abaya Anass Baya
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: