Skip to content

Commit 34afece

Browse files
committed
8185500: [TESTBUG] Add keywords headful/printer in java/awt and javax tests
Add new keyword 'printer'. Some minor test fixes to show headless exception. Add some @requires windows. Reviewed-by: serb, mbaesken
1 parent 577dc3f commit 34afece

File tree

131 files changed

+735
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+735
-521
lines changed

jdk/test/TEST.ROOT

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
# randomness tests.
1111
#
1212
# A "headful" test requires a graphical environment to meaningfully
13-
# run. Tests that are not headful are "headless."
13+
# run. Tests that are not headful are "headless".
14+
# A test flagged with key "printer" requires a printer to succeed, else
15+
# throws a PrinterException or the like.
1416

15-
keys=2d dnd i18n intermittent randomness headful
17+
keys=2d dnd headful i18n intermittent printer randomness
1618

1719
# Tests that must run in othervm mode
1820
othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle

jdk/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
2121
* questions.
2222
*/
2323

24-
/*
24+
/**
2525
* @test
26+
* @key headful
2627
* @bug 8007267
2728
* @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
2829
* @requires (os.family == "mac")

jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -20,13 +20,16 @@
2020
* or visit www.oracle.com if you need additional information or have any
2121
* questions.
2222
*/
23-
/*
23+
24+
/**
2425
* @test
26+
* @key headful
2527
* @bug 8158325
2628
* @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
2729
* @requires (os.family == "mac")
2830
* @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
2931
*/
32+
3033
import java.awt.EventQueue;
3134
import java.lang.ref.WeakReference;
3235
import java.lang.reflect.InvocationTargetException;

jdk/test/java/awt/Choice/ChoiceHiDpi/ChoiceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
2121
* questions.
2222
*/
2323

24-
/*
24+
/**
2525
* @test
26+
* @key headful
2627
* @bug 8144594
2728
* @summary HiDPI: awt.Choice looks improperly (Win 8)
2829
* @run main ChoiceTest

jdk/test/java/awt/Desktop/DesktopGtkLoadTest/DesktopGtkLoadTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
2121
* questions.
2222
*/
2323

24-
/* @test
24+
/**
25+
* @test
26+
* @key headful
2527
* @bug 8157827
2628
* @summary AWT_Desktop/Automated/Exceptions/BasicTest loads incorrect GTK
2729
* version when jdk.gtk.version=3

jdk/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,11 +30,13 @@
3030

3131
/**
3232
* @test
33+
* @key headful
3334
* @bug 8043705
3435
* @summary Can't exit color chooser dialog when running as an applet
3536
* @modules java.desktop/sun.awt
3637
* @run main CloseDialogTest
3738
*/
39+
3840
public class CloseDialogTest {
3941

4042
private static volatile Frame frame;

jdk/test/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,17 +21,19 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test 8155740
26-
@summary See <rdar://problem/3429130>: Events: actionPerformed() method not
27-
called when it is button is clicked (system load related)
28-
@summary com.apple.junit.java.awt.Frame
29-
@library ../../../regtesthelpers
30-
@build VisibilityValidator
31-
@build Util
32-
@build Waypoint
33-
@run main NestedModalDialogTest
24+
/**
25+
* @test 8155740
26+
* @key headful
27+
* @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
28+
* called when it is button is clicked (system load related)
29+
* @summary com.apple.junit.java.awt.Frame
30+
* @library ../../../regtesthelpers
31+
* @build VisibilityValidator
32+
* @build Util
33+
* @build Waypoint
34+
* @run main NestedModalDialogTest
3435
*/
36+
3537
//////////////////////////////////////////////////////////////////////////////
3638
// NestedModalDialogTest.java
3739
// The test launches a parent frame. From this parent frame it launches a modal

jdk/test/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,17 +21,19 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test 8155740
26-
@summary See <rdar://problem/3429130>: Events: actionPerformed() method not
27-
called when it is button is clicked (system load related)
28-
@summary com.apple.junit.java.awt.Frame
29-
@library ../../../regtesthelpers
30-
@build VisibilityValidator
31-
@build Util
32-
@build Waypoint
33-
@run main NestedModelessDialogTest
24+
/**
25+
* @test 8155740
26+
* @key headful
27+
* @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
28+
* called when it is button is clicked (system load related)
29+
* @summary com.apple.junit.java.awt.Frame
30+
* @library ../../../regtesthelpers
31+
* @build VisibilityValidator
32+
* @build Util
33+
* @build Waypoint
34+
* @run main NestedModelessDialogTest -Xlog:exception
3435
*/
36+
3537
/////////////////////////////////////////////////////////////////////////////
3638
// NestedModelessDialogTest.java
3739
// The test launches a parent frame. From this parent frame it launches a modal

jdk/test/java/awt/EmbeddedFrame/DisplayChangedTest/DisplayChangedTest.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,24 +21,20 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test
26-
@bug 4980592 8171363
27-
@summary switching user in XP causes an NPE in
28-
sun.awt.windows.WWindowPeer.displayChanged
29-
@requires (os.family == "windows")
30-
@modules java.desktop/java.awt.peer
31-
@modules java.desktop/sun.awt.windows:open
32-
@modules java.desktop/sun.awt
33-
@author son@sparc.spb.su: area=embedded
34-
@run main DisplayChangedTest
35-
*/
3624
/**
37-
* DisplayChangedTest.java
38-
*
39-
* summary: switching user in XP causes an NPE in
40-
* sun.awt.windows.WWindowPeer.displayChanged
25+
* @test
26+
* @key headful
27+
* @bug 4980592 8171363
28+
* @summary switching user in XP causes an NPE in
29+
* sun.awt.windows.WWindowPeer.displayChanged
30+
* @requires (os.family == "windows")
31+
* @modules java.desktop/java.awt.peer
32+
* @modules java.desktop/sun.awt.windows:open
33+
* @modules java.desktop/sun.awt
34+
* @author son@sparc.spb.su: area=embedded
35+
* @run main DisplayChangedTest
4136
*/
37+
4238
import java.awt.Frame;
4339
import java.awt.Dialog;
4440
import java.awt.TextArea;

jdk/test/java/awt/EmbeddedFrame/EmbeddedFrameGrabTest/EmbeddedFrameGrabTest.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -21,22 +21,19 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test
26-
@bug 6345003 8171363
27-
@summary grab problems with EmbeddedFrame
28-
@requires (os.family == "windows")
29-
@modules java.desktop/java.awt.peer
30-
@modules java.desktop/sun.awt
31-
@modules java.desktop/sun.awt.windows:open
32-
@author Oleg.Semenov@sun.com area=EmbeddedFrame
33-
@run main EmbeddedFrameGrabTest
34-
*/
3524
/**
36-
* EmbeddedFrameGrabTest.java
37-
*
38-
* summary: grab problems with EmbeddedFrame
25+
* @test
26+
* @key headful
27+
* @bug 6345003 8171363
28+
* @summary grab problems with EmbeddedFrame
29+
* @requires (os.family == "windows")
30+
* @modules java.desktop/java.awt.peer
31+
* @modules java.desktop/sun.awt
32+
* @modules java.desktop/sun.awt.windows:open
33+
* @author Oleg.Semenov@sun.com area=EmbeddedFrame
34+
* @run main EmbeddedFrameGrabTest
3935
*/
36+
4037
import java.awt.Frame;
4138
import java.awt.peer.FramePeer;
4239
import javax.swing.JComboBox;

0 commit comments

Comments
 (0)