Skip to content

Commit cc30193

Browse files
yaqsunjerboaa
authored andcommitted
8185500: [TESTBUG] Add keywords headful/printer in java/awt and javax tests.
8186259: IOExceptionIfEncodedURLTest.sh versus IOExceptionIfEncodedURLTest.java Add new keyword 'printer'. Some minor test fixes to show headless exception. Add some @requires windows. Reviewed-by: serb Backport-of: 34afeced211cd7115e2529b043c1e57dfa1291fe
1 parent 2821dce commit cc30193

File tree

78 files changed

+453
-347
lines changed

Some content is hidden

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

78 files changed

+453
-347
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 jfr
17+
keys=2d dnd headful i18n intermittent printer randomness jfr
1618

1719
# Tests that must run in othervm mode
1820
othervm.dirs=java/awt java/beans java/rmi javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces sun/rmi

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, 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: 6 additions & 3 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;
@@ -102,4 +105,4 @@ private static void removeMenuItemFromMenu() {
102105
Objects.requireNonNull(menuItem, "The menu item should still be available at this point");
103106
sMenu.remove(menuItem);
104107
}
105-
}
108+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 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,6 +30,7 @@
3030

3131
/**
3232
* @test
33+
* @key headful
3334
* @bug 8043705
3435
* @summary Can't exit color chooser dialog when running as an applet
3536
* @run main CloseDialogTest

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

Lines changed: 10 additions & 14 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,21 +21,17 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test
26-
@bug 4980592
27-
@summary switching user in XP causes an NPE in
28-
sun.awt.windows.WWindowPeer.displayChanged
29-
@requires (os.family == "windows")
30-
@author [email protected]: area=embedded
31-
@run main DisplayChangedTest
32-
*/
3324
/**
34-
* DisplayChangedTest.java
35-
*
36-
* summary: switching user in XP causes an NPE in
37-
* sun.awt.windows.WWindowPeer.displayChanged
25+
* @test
26+
* @key headful
27+
* @bug 4980592
28+
* @summary switching user in XP causes an NPE in
29+
* sun.awt.windows.WWindowPeer.displayChanged
30+
* @requires (os.family == "windows")
31+
* @author [email protected]: area=embedded
32+
* @run main DisplayChangedTest
3833
*/
34+
3935
import java.awt.Frame;
4036
import java.awt.Dialog;
4137
import java.awt.TextArea;

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

Lines changed: 9 additions & 12 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,19 +21,16 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test
26-
@bug 6345002
27-
@summary grab problems with EmbeddedFrame
28-
@requires (os.family == "windows")
29-
@author [email protected] area=EmbeddedFrame
30-
@run main EmbeddedFrameGrabTest
31-
*/
3224
/**
33-
* EmbeddedFrameGrabTest.java
34-
*
35-
* summary: grab problems with EmbeddedFrame
25+
* @test
26+
* @key headful
27+
* @bug 6345003
28+
* @summary grab problems with EmbeddedFrame
29+
* @requires (os.family == "windows")
30+
* @author [email protected] area=EmbeddedFrame
31+
* @run main EmbeddedFrameGrabTest
3632
*/
33+
3734
import java.awt.Frame;
3835
import java.awt.peer.FramePeer;
3936
import javax.swing.JComboBox;

jdk/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 1998, 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
@@ -23,6 +23,7 @@
2323

2424
<HTML>
2525
<!-- @test
26+
@key headful
2627
@bug 4023283
2728
@summary Checks that an Error which propogate up to the EventDispatch
2829
loop does not crash AWT.

jdk/test/java/awt/EventQueue/6980209/bug6980209.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 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,11 +21,13 @@
2121
* questions.
2222
*/
2323

24-
/* @test
25-
@bug 6980209
26-
@summary Make tracking SecondaryLoop.enter/exit methods easier
27-
@author Semyon Sadetsky
28-
*/
24+
/**
25+
* @test
26+
* @key headful
27+
* @bug 6980209
28+
* @summary Make tracking SecondaryLoop.enter/exit methods easier
29+
* @author Semyon Sadetsky
30+
*/
2931

3032
import javax.swing.*;
3133
import java.awt.*;

jdk/test/java/awt/Focus/FocusEmbeddedFrameTest/FocusEmbeddedFrameTest.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@
2121
* questions.
2222
*/
2323

24-
/*
25-
@test
26-
@bug 6516675
27-
@summary Tests that EmbeddedFrame can be focused.
28-
@author anton.tarasov: area=awt-focus
29-
@library ../../regtesthelpers
30-
@build Util UtilInternal
31-
@run main FocusEmbeddedFrameTest
32-
*/
24+
/**
25+
* @test
26+
* @key headful
27+
* @bug 6516675
28+
* @summary Tests that EmbeddedFrame can be focused.
29+
* @author anton.tarasov: area=awt-focus
30+
* @requires (os.family == "windows")
31+
* @library ../../regtesthelpers
32+
* @build Util UtilInternal
33+
* @run main FocusEmbeddedFrameTest
34+
*/
3335

3436
import java.awt.*;
3537
import java.awt.event.*;

0 commit comments

Comments
 (0)