Mercurial > hg > icedtea8-forest > jdk
changeset 14869:b0b404c86143
8166015: [PIT][TEST_BUG] stray character in java/awt/Focus/ModalDialogActivationTest/ModalDialogActivationTest.java
Reviewed-by: aghaisas, ssadetsky
author | arapte |
---|---|
date | Tue, 20 Sep 2016 12:37:54 +0530 |
parents | 31185ebcc316 |
children | dd1d220caeaf |
files | test/java/awt/Focus/ModalDialogActivationTest/ModalDialogActivationTest.java |
diffstat | 1 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/test/java/awt/Focus/ModalDialogActivationTest/ModalDialogActivationTest.java Tue Mar 19 12:29:40 2019 -0400 +++ b/test/java/awt/Focus/ModalDialogActivationTest/ModalDialogActivationTest.java Tue Sep 20 12:37:54 2016 +0530 @@ -23,15 +23,21 @@ * questions. */ -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; +import java.awt.EventQueue; +import java.awt.Frame; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import javax.swing.JDialog; +import javax.swing.JFrame; /* @test - @bug 8160570 - @summary Tests that a modal dialog receives WINDOW_ACTIVATED & WINDOW_GAINED_FOCUS on first show. + @key headful + @bug 8160570 8166015 + @summary Tests that a modal dialog receives WINDOW_ACTIVATED + & WINDOW_GAINED_FOCUS on first show. */ + public class ModalDialogActivationTest { static final Object lock = new Object(); static volatile boolean activated; @@ -48,7 +54,8 @@ } } if (!activated || !focused) { - throw new RuntimeException("Test FAILED: activated: " + activated + ", focused: " + focused); + throw new RuntimeException("Test FAILED: activated: " + activated + + ", focused: " + focused); } System.out.println("Test PASSED"); } @@ -79,7 +86,7 @@ } static class MyModalDialog extends JDialog { - public MyModalDialog(Frame owner, String title)ยช { + public MyModalDialog(Frame owner, String title) { super(owner, title, true); }