8213110: Remove the use of applets in automatic tests
Reviewed-by: prr
This commit is contained in:
parent
e735fe2fc4
commit
b5998aadf0
@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
# jdk_awt
|
# jdk_awt
|
||||||
|
|
||||||
java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.html 8168389 windows-all,macosx-all
|
java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.java 8168389 windows-all,macosx-all
|
||||||
java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java 8168408 windows-all,macosx-all
|
java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java 8168408 windows-all,macosx-all
|
||||||
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
|
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
|
||||||
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
|
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
|
||||||
@ -127,7 +127,7 @@ java/awt/FileDialog/8003399/bug8003399.java 8198334 windows-all
|
|||||||
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion.java 8060176 windows-all,macosx-all
|
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion.java 8060176 windows-all,macosx-all
|
||||||
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all
|
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_1.java 8060176 windows-all,macosx-all
|
||||||
java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java 8164464 linux-all,macosx-all
|
java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java 8164464 linux-all,macosx-all
|
||||||
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.html 8171510 macosx-all
|
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java 8171510 macosx-all
|
||||||
javax/swing/dnd/7171812/bug7171812.java 8041447 macosx-all
|
javax/swing/dnd/7171812/bug7171812.java 8041447 macosx-all
|
||||||
java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all,macosx-all
|
java/awt/Focus/ChoiceFocus/ChoiceFocus.java 8169103 windows-all,macosx-all
|
||||||
java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618 macosx-all
|
java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java 8198618 macosx-all
|
||||||
@ -139,7 +139,7 @@ java/awt/Focus/NoAutotransferToDisabledCompTest/NoAutotransferToDisabledCompTest
|
|||||||
java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java 8028701 macosx-all,linux-all
|
java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java 8028701 macosx-all,linux-all
|
||||||
java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java 8159599 macosx-all
|
java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java 8159599 macosx-all
|
||||||
java/awt/Focus/TypeAhead/TestFocusFreeze.java 8198622 macosx-all
|
java/awt/Focus/TypeAhead/TestFocusFreeze.java 8198622 macosx-all
|
||||||
java/awt/Focus/ToFrontFocusTest/ToFrontFocus.html 7156130 linux-all
|
java/awt/Focus/ToFrontFocusTest/ToFrontFocus.java 7156130 linux-all
|
||||||
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096 macosx-all
|
java/awt/Focus/WrongKeyTypedConsumedTest/WrongKeyTypedConsumedTest.java 8169096 macosx-all
|
||||||
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
|
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 generic-all
|
||||||
java/awt/EventQueue/6980209/bug6980209.java 8198615 macosx-all
|
java/awt/EventQueue/6980209/bug6980209.java 8198615 macosx-all
|
||||||
@ -149,7 +149,7 @@ java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150 macosx-all
|
|||||||
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
|
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
|
||||||
java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java 8198623 macosx-all
|
java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java 8198623 macosx-all
|
||||||
java/awt/KeyboardFocusmanager/TypeAhead/FreezeTest/FreezeTest.java 8198623 macosx-all
|
java/awt/KeyboardFocusmanager/TypeAhead/FreezeTest/FreezeTest.java 8198623 macosx-all
|
||||||
java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html 8198626 macosx-all
|
java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.java 8198626 macosx-all
|
||||||
java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405 macosx-all
|
java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405 macosx-all
|
||||||
java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java 8048171 generic-all
|
java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java 8048171 generic-all
|
||||||
java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java 8159451 linux-all,windows-all,macosx-all
|
java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java 8159451 linux-all,windows-all,macosx-all
|
||||||
@ -166,7 +166,7 @@ java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java 6829250 windows-all
|
|||||||
java/awt/Toolkit/RealSync/Test.java 6849383 macosx-all
|
java/awt/Toolkit/RealSync/Test.java 6849383 macosx-all
|
||||||
java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java 8159252 windows-all
|
java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java 8159252 windows-all
|
||||||
java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java 8203047 macosx-all
|
java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java 8203047 macosx-all
|
||||||
java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html 8073636 macosx-all
|
java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java 8073636 macosx-all
|
||||||
java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055 windows-all,linux-all
|
java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055 windows-all,linux-all
|
||||||
java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all,macosx-all
|
java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all,macosx-all
|
||||||
java/awt/Focus/6378278/InputVerifierTest.java 8198616 macosx-all
|
java/awt/Focus/6378278/InputVerifierTest.java 8198616 macosx-all
|
||||||
@ -182,7 +182,7 @@ java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java 8129778
|
|||||||
java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java 8129778 generic-all
|
java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java 8129778 generic-all
|
||||||
java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTest.java 8129778 generic-all
|
java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTest.java 8129778 generic-all
|
||||||
|
|
||||||
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.html 8194947 generic-all
|
java/awt/dnd/URIListToFileListBetweenJVMsTest/URIListToFileListBetweenJVMsTest.java 8194947 generic-all
|
||||||
java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java 8196006 windows-all
|
java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java 8196006 windows-all
|
||||||
java/awt/Frame/FramesGC/FramesGC.java 8079069 macosx-all
|
java/awt/Frame/FramesGC/FramesGC.java 8079069 macosx-all
|
||||||
java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java 8047218 generic-all
|
java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java 8047218 generic-all
|
||||||
@ -246,11 +246,11 @@ java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8197796 ge
|
|||||||
java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java 8196300 windows-all
|
java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java 8196300 windows-all
|
||||||
java/awt/print/PrinterJob/PSQuestionMark.java 7003378 generic-all
|
java/awt/print/PrinterJob/PSQuestionMark.java 7003378 generic-all
|
||||||
java/awt/print/PrinterJob/GlyphPositions.java 7003378 generic-all
|
java/awt/print/PrinterJob/GlyphPositions.java 7003378 generic-all
|
||||||
java/awt/Choice/PopupPosTest/PopupPosTest.html 8197811 windows-all
|
java/awt/Choice/PopupPosTest/PopupPosTest.java 8197811 windows-all
|
||||||
java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 7100044 macosx-all,linux-all
|
java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 7100044 macosx-all,linux-all
|
||||||
java/awt/Component/CreateImage/CreateImage.java 8198334 windows-all
|
java/awt/Component/CreateImage/CreateImage.java 8198334 windows-all
|
||||||
java/awt/Component/GetScreenLocTest/GetScreenLocTest.java 4753654 generic-all
|
java/awt/Component/GetScreenLocTest/GetScreenLocTest.java 4753654 generic-all
|
||||||
java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html 8017454 macosx-all
|
java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java 8017454 macosx-all
|
||||||
java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java 8000171 windows-all
|
java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java 8000171 windows-all
|
||||||
java/awt/Frame/MiscUndecorated/RepaintTest.java 8079267 windows-all,linux-all
|
java/awt/Frame/MiscUndecorated/RepaintTest.java 8079267 windows-all,linux-all
|
||||||
java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java 8157173 generic-all
|
java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java 8157173 generic-all
|
||||||
@ -465,14 +465,14 @@ java/awt/image/VolatileImage/GradientPaints.java 8199003 linux-all
|
|||||||
java/awt/JAWT/JAWT.sh 8197798 windows-all,linux-all
|
java/awt/JAWT/JAWT.sh 8197798 windows-all,linux-all
|
||||||
java/awt/Debug/DumpOnKey/DumpOnKey.java 8202667 windows-all
|
java/awt/Debug/DumpOnKey/DumpOnKey.java 8202667 windows-all
|
||||||
java/awt/Robot/RobotWheelTest/RobotWheelTest.java 8129827 generic-all
|
java/awt/Robot/RobotWheelTest/RobotWheelTest.java 8129827 generic-all
|
||||||
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.html 8202926 linux-all
|
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java 8202926 linux-all
|
||||||
java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java 8202860 linux-all
|
java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java 8202860 linux-all
|
||||||
java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java 8202790 macosx-all,linux-all
|
java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java 8202790 macosx-all,linux-all
|
||||||
java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.html 8202882 linux-all
|
java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java 8202882 linux-all
|
||||||
java/awt/Frame/FramesGC/FramesGC.java 8079069 macosx-all
|
java/awt/Frame/FramesGC/FramesGC.java 8079069 macosx-all
|
||||||
java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java 8030121 macosx-all,linux-all
|
java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java 8030121 macosx-all,linux-all
|
||||||
java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java 8202931 macosx-all,linux-all
|
java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java 8202931 macosx-all,linux-all
|
||||||
java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.html 7124275 macosx-all
|
java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.java 7124275 macosx-all
|
||||||
java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java 6848810 macosx-all,linux-all
|
java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java 6848810 macosx-all,linux-all
|
||||||
java/awt/Component/NativeInLightShow/NativeInLightShow.java 8202932 linux-all
|
java/awt/Component/NativeInLightShow/NativeInLightShow.java 8202932 linux-all
|
||||||
java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java 8194751 linux-all
|
java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java 8194751 linux-all
|
||||||
@ -481,7 +481,7 @@ java/awt/SplashScreen/MultiResolutionSplash/unix/UnixMultiResolutionSplashTest.j
|
|||||||
java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java 7107528 linux-all,macosx-all
|
java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java 7107528 linux-all,macosx-all
|
||||||
java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java 8080676 linux-all
|
java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java 8080676 linux-all
|
||||||
java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersInKeyEvent.java 8157147 linux-all,solaris-all,windows-all
|
java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersInKeyEvent.java 8157147 linux-all,solaris-all,windows-all
|
||||||
java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.html 8148041 linux-all
|
java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.java 8148041 linux-all
|
||||||
java/awt/Toolkit/DesktopProperties/rfe4758438.java 8193547 linux-all
|
java/awt/Toolkit/DesktopProperties/rfe4758438.java 8193547 linux-all
|
||||||
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163
|
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163
|
||||||
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
|
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6200670
|
|
||||||
@summary MouseMoved events are triggered by Choice when mouse is moved outside the component, XToolkit
|
|
||||||
@library ../../regtesthelpers/
|
|
||||||
@author andrei.dmitriev area=choice
|
|
||||||
@build Util
|
|
||||||
@run applet PopdownGeneratesMouseEvents.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>PopdownGeneratesMouseEvents<br>Bug ID: 6200670 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="PopdownGeneratesMouseEvents.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,27 +22,32 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6200670
|
@bug 6200670
|
||||||
@summary MouseMoved events are triggered by Choice when mouse is moved outside the component, XToolkit
|
@summary MouseMoved events are triggered by Choice when mouse is moved outside the component, XToolkit
|
||||||
@library ../../regtesthelpers/
|
@library ../../regtesthelpers/
|
||||||
@author andrei.dmitriev area=choice
|
|
||||||
@build Util
|
@build Util
|
||||||
@run applet PopdownGeneratesMouseEvents.html
|
@run main PopdownGeneratesMouseEvents
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
public class PopdownGeneratesMouseEvents extends Applet {
|
public class PopdownGeneratesMouseEvents extends Frame {
|
||||||
private volatile Robot robot;
|
private volatile Robot robot;
|
||||||
private final Choice choice1 = new Choice();
|
private final Choice choice1 = new Choice();
|
||||||
|
|
||||||
private volatile MouseMotionHandler mmh;
|
private volatile MouseMotionHandler mmh;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
PopdownGeneratesMouseEvents app = new PopdownGeneratesMouseEvents();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
for (int i = 1; i < 10; i++) {
|
for (int i = 1; i < 10; i++) {
|
||||||
choice1.add("item-0" + i);
|
choice1.add("item-0" + i);
|
||||||
@ -61,6 +66,7 @@ public class PopdownGeneratesMouseEvents extends Applet {
|
|||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
setSize(300, 200);
|
setSize(300, 200);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
validate();
|
validate();
|
||||||
String toolkit = Toolkit.getDefaultToolkit().getClass().getName();
|
String toolkit = Toolkit.getDefaultToolkit().getClass().getName();
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5044150
|
|
||||||
@summary Tests that pupup doesn't popdown if no space to display under
|
|
||||||
@author ssi@sparc.spb.su
|
|
||||||
@library /test/lib
|
|
||||||
@build jdk.test.lib.Platform
|
|
||||||
@run applet PopupPosTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> PopupPosTest </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>PopupPosTest<br>Bug ID: 5044150</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="PopupPosTest.class" WIDTH=350 HEIGHT=400></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -22,25 +22,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 5044150
|
@bug 5044150
|
||||||
@summary Tests that pupup doesn't popdown if no space to display under
|
@summary Tests that pupup doesn't popdown if no space to display under
|
||||||
@author andrei.dmitriev area=awt.choice
|
|
||||||
@library /test/lib
|
@library /test/lib
|
||||||
@build jdk.test.lib.Platform
|
@build jdk.test.lib.Platform
|
||||||
@run applet PopupPosTest.html
|
@run main PopupPosTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
import jdk.test.lib.Platform;
|
import jdk.test.lib.Platform;
|
||||||
|
|
||||||
public class PopupPosTest extends Applet
|
public class PopupPosTest {
|
||||||
{
|
|
||||||
public void start ()
|
public static void main(final String[] args) {
|
||||||
{
|
|
||||||
if (Platform.isOSX()) {
|
if (Platform.isOSX()) {
|
||||||
// On OS X, popup isn't under the mouse
|
// On OS X, popup isn't under the mouse
|
||||||
return;
|
return;
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6392086 8014725
|
|
||||||
@summary Tests basic DnD functionality in an applet
|
|
||||||
@author Alexey Utkin, Semyon Sadetsky area=dnd
|
|
||||||
@run applet HTMLTransferTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>HTMLTransferTest<br>Bug ID: 6392086</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="HTMLTransferTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,26 +22,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6392086 8014725
|
@bug 6392086 8014725
|
||||||
@summary Tests basic DnD functionality in an applet
|
@summary tests that HTMLs of all supported native HTML formats are transfered
|
||||||
@author Alexey Utkin, Semyon Sadetsky
|
properly
|
||||||
@run applet HTMLTransferTest.html
|
@run main/othervm HTMLTransferTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* HTMLTransferTest.java
|
|
||||||
*
|
|
||||||
* summary: tests that HTMLs of all supported native HTML formats
|
|
||||||
* are transfered properly
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.datatransfer.*;
|
import java.awt.datatransfer.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
|
public class HTMLTransferTest {
|
||||||
public class HTMLTransferTest extends Applet {
|
|
||||||
public static final int CODE_NOT_RETURNED = 100;
|
public static final int CODE_NOT_RETURNED = 100;
|
||||||
public static final int CODE_CONSUMER_TEST_FAILED = 101;
|
public static final int CODE_CONSUMER_TEST_FAILED = 101;
|
||||||
public static final int CODE_FAILURE = 102;
|
public static final int CODE_FAILURE = 102;
|
||||||
@ -66,6 +59,12 @@ public class HTMLTransferTest extends Applet {
|
|||||||
private THTMLProducer imPr;
|
private THTMLProducer imPr;
|
||||||
private int returnCode = CODE_NOT_RETURNED;
|
private int returnCode = CODE_NOT_RETURNED;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
HTMLTransferTest app = new HTMLTransferTest();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
initImpl();
|
initImpl();
|
||||||
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6533175
|
|
||||||
@summary Block F10 if closest toplevel to keystroke target is not a Frame.
|
|
||||||
@author yuri nesterenko : area= awt.toplevel
|
|
||||||
@run applet F10TopToplevel.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>F10TopToplevel<br>Bug ID: 6533175 Pressing F10 when a modal dialog is visible hangs the Xserver, XToolkit</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="F10TopToplevel.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -20,51 +20,25 @@
|
|||||||
* or visit www.oracle.com if you need additional information or have any
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6533175
|
@bug 6533175
|
||||||
@summary Block F10 if closest toplevel to keystroke target is not a Frame.
|
@summary Block F10 if closest toplevel to keystroke target is not a Frame.
|
||||||
@author yuri nesterenko : area=awt.toplevel
|
@run main F10TopToplevel
|
||||||
@run applet F10TopToplevel.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* F10TopToplevel.java
|
|
||||||
*
|
|
||||||
* summary: tests if F10 has no effect if focused toplevel if not Frame
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
|
public class F10TopToplevel {
|
||||||
|
|
||||||
public class F10TopToplevel extends Applet
|
static Frame frame;
|
||||||
{
|
static Dialog dialog;
|
||||||
//Declare things used in the test, like buttons and labels here
|
static volatile boolean menuToggled = false;
|
||||||
Frame frame;
|
|
||||||
Dialog dialog;
|
|
||||||
volatile boolean menuToggled = false;
|
|
||||||
|
|
||||||
public void init()
|
public static void main(final String[] args) {
|
||||||
{
|
|
||||||
setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start ()
|
|
||||||
{
|
|
||||||
//Get things going. Request focus, set size, et cetera
|
|
||||||
setSize (200,200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
|
|
||||||
//What would normally go into main() will probably go here.
|
|
||||||
//Use System.out.println for diagnostic messages that you want
|
|
||||||
//to read after the test is done.
|
|
||||||
MenuBar mb;
|
MenuBar mb;
|
||||||
Menu menu;
|
Menu menu;
|
||||||
MenuItem item;
|
MenuItem item;
|
||||||
@ -115,6 +89,5 @@ public class F10TopToplevel extends Applet
|
|||||||
throw new RuntimeException("Oops! Menu should not open.");
|
throw new RuntimeException("Oops! Menu should not open.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}// start()
|
}
|
||||||
|
|
||||||
}// class F10TopToplevel
|
}// class F10TopToplevel
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,9 +39,8 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
|
|
||||||
public class BorderTest extends Applet {
|
public class BorderTest extends Panel {
|
||||||
Panel panel1;
|
Panel panel1;
|
||||||
Panel panel2;
|
Panel panel2;
|
||||||
|
|
||||||
@ -108,8 +107,6 @@ public class BorderTest extends Applet {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
BorderTest BorderTest = new BorderTest();
|
BorderTest BorderTest = new BorderTest();
|
||||||
BorderTest.init();
|
|
||||||
BorderTest.start();
|
|
||||||
|
|
||||||
f.add("Center", BorderTest);
|
f.add("Center", BorderTest);
|
||||||
f.setSize(450, 300);
|
f.setSize(450, 300);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,9 +39,8 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
|
|
||||||
public class FlowTest extends Applet {
|
public class FlowTest extends Panel {
|
||||||
Panel panel;
|
Panel panel;
|
||||||
|
|
||||||
public FlowTest() {
|
public FlowTest() {
|
||||||
@ -141,8 +140,6 @@ public class FlowTest extends Applet {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
FlowTest flowTest = new FlowTest();
|
FlowTest flowTest = new FlowTest();
|
||||||
flowTest.init();
|
|
||||||
flowTest.start();
|
|
||||||
|
|
||||||
f.add("Center", flowTest);
|
f.add("Center", flowTest);
|
||||||
f.setSize(300, 300);
|
f.setSize(300, 300);
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<HTML>
|
|
||||||
<!-- @test
|
|
||||||
@key headful
|
|
||||||
@bug 4023283
|
|
||||||
@summary Checks that an Error which propogate up to the EventDispatch
|
|
||||||
loop does not crash AWT.
|
|
||||||
@author Andrei Dmitriev: area=awt.event
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@modules java.desktop/sun.awt
|
|
||||||
@build Util
|
|
||||||
@run main LoopRobustness
|
|
||||||
-->
|
|
||||||
<HEAD>
|
|
||||||
<TITLE>LoopRobustness</TITLE>
|
|
||||||
</HEAD>
|
|
||||||
<BODY>
|
|
||||||
This is automatic test.
|
|
||||||
|
|
||||||
<APPLET CODE="LoopRobustness.class"
|
|
||||||
CODEBASE = "."
|
|
||||||
WIDTH=350 HEIGHT=100>
|
|
||||||
</APPLET>
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
@ -22,13 +22,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @test
|
||||||
* @bug 4023283
|
* @bug 4023283
|
||||||
* @key headful
|
* @key headful
|
||||||
* @summary Checks that an Error which propogates up to the EventDispatch
|
* @summary Checks that an Error which propogates up to the EventDispatch
|
||||||
* loop does not crash AWT.
|
* loop does not crash AWT.
|
||||||
* @author Andrei Dmitriev: area=awt.event
|
* @author Andrei Dmitriev: area=awt.event
|
||||||
* @library ../../regtesthelpers
|
* @library ../../regtesthelpers
|
||||||
|
* @modules java.desktop/sun.awt
|
||||||
* @build Util
|
* @build Util
|
||||||
* @run main LoopRobustness
|
* @run main LoopRobustness
|
||||||
*/
|
*/
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6448069
|
|
||||||
@summary namefilter is not called for file dialog on windows
|
|
||||||
@author oleg.sukhodolsky: area= awt.filedialog
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet FilenameFilterTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>FilenameFilterTest<br>Bug ID: 6448069 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="FilenameFilterTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,20 +22,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6448069
|
@bug 6448069
|
||||||
@summary namefilter is not called for file dialog on windows
|
@summary namefilter is not called for file dialog on windows
|
||||||
@author oleg.sukhodolsky: area= awt.filedialog
|
@library ../../regtesthelpers
|
||||||
@run applet FilenameFilterTest.html
|
@build Util
|
||||||
|
@run main FilenameFilterTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* FilenameFilterTest.java
|
|
||||||
*
|
|
||||||
* summary: namefilter is not called for file dialog on windows
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -43,28 +38,12 @@ import java.io.FilenameFilter;
|
|||||||
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class FilenameFilterTest extends Applet
|
public class FilenameFilterTest {
|
||||||
{
|
|
||||||
//Declare things used in the test, like buttons and labels here
|
|
||||||
volatile boolean filter_was_called = false;
|
|
||||||
FileDialog fd;
|
|
||||||
|
|
||||||
public void init()
|
static volatile boolean filter_was_called = false;
|
||||||
{
|
static FileDialog fd;
|
||||||
// Set up the environment -- set the layout manager, add
|
|
||||||
// buttons, etc.
|
|
||||||
|
|
||||||
setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start ()
|
|
||||||
{
|
|
||||||
//Get things going. Request focus, set size, et cetera
|
|
||||||
setSize (200,200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
EventQueue.invokeLater(new Runnable() {
|
EventQueue.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
fd = new FileDialog(new Frame(""), "hello world", FileDialog.LOAD);
|
fd = new FileDialog(new Frame(""), "hello world", FileDialog.LOAD);
|
||||||
@ -93,6 +72,5 @@ public class FilenameFilterTest extends Applet
|
|||||||
if (!filter_was_called) {
|
if (!filter_was_called) {
|
||||||
throw new RuntimeException("Filter was not called");
|
throw new RuntimeException("Filter was not called");
|
||||||
}
|
}
|
||||||
}// start()
|
}
|
||||||
|
|
||||||
}// class FilenameFilterTest
|
}// class FilenameFilterTest
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6314575
|
@bug 6314575
|
||||||
@summary Tests that previosly focused owned window doesn't steal focus when an owner's component requests focus.
|
@summary Tests that previosly focused owned window doesn't steal focus when an owner's component requests focus.
|
||||||
@author Anton.Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main ActualFocusedWindowBlockingTest
|
@run main ActualFocusedWindowBlockingTest
|
||||||
@ -34,12 +33,9 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ActualFocusedWindowBlockingTest extends Applet {
|
public class ActualFocusedWindowBlockingTest {
|
||||||
Robot robot = Util.createRobot();
|
Robot robot = Util.createRobot();
|
||||||
Frame owner = new Frame("Owner Frame");
|
Frame owner = new Frame("Owner Frame");
|
||||||
Window win = new Window(owner);
|
Window win = new Window(owner);
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 4823903
|
@bug 4823903
|
||||||
@summary Tests actual focused window retaining.
|
@summary Tests actual focused window retaining.
|
||||||
@author Anton.Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main ActualFocusedWindowRetaining
|
@run main ActualFocusedWindowRetaining
|
||||||
@ -34,11 +33,9 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.lang.reflect.*;
|
|
||||||
import java.applet.*;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ActualFocusedWindowRetaining extends Applet {
|
public class ActualFocusedWindowRetaining {
|
||||||
public static Frame frame = new Frame("Other Frame");
|
public static Frame frame = new Frame("Other Frame");
|
||||||
public static Frame owner = new Frame("Test Frame");
|
public static Frame owner = new Frame("Test Frame");
|
||||||
public static Button otherButton1 = new Button("Other Button 1");
|
public static Button otherButton1 = new Button("Other Button 1");
|
||||||
@ -54,7 +51,6 @@ public class ActualFocusedWindowRetaining extends Applet {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
ActualFocusedWindowRetaining a = new ActualFocusedWindowRetaining();
|
ActualFocusedWindowRetaining a = new ActualFocusedWindowRetaining();
|
||||||
a.init();
|
|
||||||
a.start();
|
a.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,10 +72,6 @@ public class ActualFocusedWindowRetaining extends Applet {
|
|||||||
}
|
}
|
||||||
}, AWTEvent.WINDOW_EVENT_MASK | AWTEvent.WINDOW_FOCUS_EVENT_MASK | AWTEvent.FOCUS_EVENT_MASK);
|
}, AWTEvent.WINDOW_EVENT_MASK | AWTEvent.WINDOW_FOCUS_EVENT_MASK | AWTEvent.FOCUS_EVENT_MASK);
|
||||||
|
|
||||||
setSize (500, 200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
frame.setSize(new Dimension(400, 100));
|
frame.setSize(new Dimension(400, 100));
|
||||||
frame.setLocation(800, 400);
|
frame.setLocation(800, 400);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4041703 4096228 4025223 4260929
|
|
||||||
@summary Ensures that appletviewer sets a reasonable default focus for an Applet on start
|
|
||||||
@author das area=appletviewer
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet AppletInitialFocusTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> AppletInitialFocusTest </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>AppletInitialFocusTest<br>Bug ID: 4041703</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="AppletInitialFocusTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,30 +22,42 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 4041703 4096228 4025223 4260929
|
@bug 4041703 4096228 4025223 4260929
|
||||||
@summary Ensures that appletviewer sets a reasonable default focus for an Applet on start
|
@summary Ensures that appletviewer sets a reasonable default focus for an Applet on start
|
||||||
@author das area=appletviewer
|
@library ../../regtesthelpers
|
||||||
@run applet AppletInitialFocusTest.html
|
@build Util
|
||||||
|
@run main AppletInitialFocusTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.Button;
|
import java.awt.Button;
|
||||||
import java.awt.Component;
|
import java.awt.FlowLayout;
|
||||||
|
import java.awt.Frame;
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
import java.awt.Window;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class AppletInitialFocusTest extends Applet {
|
public class AppletInitialFocusTest extends Frame {
|
||||||
|
|
||||||
Robot robot = Util.createRobot();
|
Robot robot = Util.createRobot();
|
||||||
Button button = new Button("Button");
|
Button button = new Button("Button");
|
||||||
|
|
||||||
public void init() {
|
public static void main(final String[] args) throws Exception {
|
||||||
add(button);
|
AppletInitialFocusTest app = new AppletInitialFocusTest();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void init() {
|
||||||
new Thread(new Runnable() {
|
setSize(200, 200);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
setLayout(new FlowLayout());
|
||||||
|
add(button);
|
||||||
|
setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void start() throws Exception {
|
||||||
|
Thread thread = new Thread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Util.waitTillShown(button);
|
Util.waitTillShown(button);
|
||||||
robot.delay(1000); // delay the thread to let EDT to start dispatching focus events
|
robot.delay(1000); // delay the thread to let EDT to start dispatching focus events
|
||||||
@ -54,6 +66,8 @@ public class AppletInitialFocusTest extends Applet {
|
|||||||
throw new RuntimeException("Appletviewer doesn't set default focus correctly.");
|
throw new RuntimeException("Appletviewer doesn't set default focus correctly.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
});
|
||||||
|
thread.start();
|
||||||
|
thread.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4411534 4517274
|
|
||||||
@summary ensures that user's requestFocus() during applet initialization
|
|
||||||
is not ignored
|
|
||||||
@author prs area=appletviewer
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet AppletInitialFocusTest1.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> AppletInitialFocusTest1 </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>AppletInitialFocusTest1<br>Bug ID: 4517274</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="AppletInitialFocusTest1.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -21,18 +21,36 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
public class AppletInitialFocusTest1 extends Applet implements FocusListener {
|
/*
|
||||||
|
@test
|
||||||
|
@key headful
|
||||||
|
@bug 4411534 4517274
|
||||||
|
@summary ensures that user's requestFocus() during applet initialization
|
||||||
|
is not ignored
|
||||||
|
@library ../../regtesthelpers
|
||||||
|
@build Util
|
||||||
|
@run main AppletInitialFocusTest1
|
||||||
|
*/
|
||||||
|
public class AppletInitialFocusTest1 extends Frame implements FocusListener {
|
||||||
|
|
||||||
Button button1 = new Button("Button1");
|
Button button1 = new Button("Button1");
|
||||||
Button button2 = new Button("Button2");
|
Button button2 = new Button("Button2");
|
||||||
|
|
||||||
Object lock = new Object();
|
Object lock = new Object();
|
||||||
|
|
||||||
|
public static void main(final String[] args) throws Exception {
|
||||||
|
AppletInitialFocusTest1 app = new AppletInitialFocusTest1();
|
||||||
|
app.init();
|
||||||
|
Thread.sleep(10000);
|
||||||
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
|
setSize(200, 200);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
setLayout(new FlowLayout());
|
||||||
|
|
||||||
Component parent = this;
|
Component parent = this;
|
||||||
while (parent != null && !(parent instanceof Window)) {
|
while (parent != null && !(parent instanceof Window)) {
|
||||||
@ -52,34 +70,18 @@ public class AppletInitialFocusTest1 extends Applet implements FocusListener {
|
|||||||
button2.addFocusListener(this);
|
button2.addFocusListener(this);
|
||||||
add(button1);
|
add(button1);
|
||||||
add(button2);
|
add(button2);
|
||||||
|
setVisible(true);
|
||||||
button2.requestFocus();
|
button2.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void focusGained(FocusEvent e) {
|
public void focusGained(FocusEvent e) {
|
||||||
if (e.getSource() == button1) {
|
if (e.getSource() == button1) {
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
System.err.println("failed: focus on the wrong button");
|
throw new RuntimeException("failed: focus on the wrong button");
|
||||||
System.exit(2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void focusLost(FocusEvent e) {
|
public void focusLost(FocusEvent e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
|
||||||
Thread thread = new Thread(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
Thread.sleep(10000);
|
|
||||||
synchronized (lock) {
|
|
||||||
System.err.println("passed");
|
|
||||||
System.exit(0);
|
|
||||||
}
|
|
||||||
} catch(InterruptedException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
thread.start();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -26,20 +26,15 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6187066
|
@bug 6187066
|
||||||
@summary Tests the Window.autoRequestFocus property for the Window.setVisible() method.
|
@summary Tests the Window.autoRequestFocus property for the Window.setVisible() method.
|
||||||
@author anton.tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main AutoRequestFocusSetVisibleTest
|
@run main AutoRequestFocusSetVisibleTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class AutoRequestFocusSetVisibleTest extends Applet {
|
public class AutoRequestFocusSetVisibleTest {
|
||||||
static Frame focusedFrame;
|
static Frame focusedFrame;
|
||||||
static Button focusOwner;
|
static Button focusOwner;
|
||||||
static Frame frame;
|
static Frame frame;
|
||||||
@ -65,10 +60,6 @@ public class AutoRequestFocusSetVisibleTest extends Applet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
toolkitClassName = Toolkit.getDefaultToolkit().getClass().getName();
|
toolkitClassName = Toolkit.getDefaultToolkit().getClass().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6187066
|
@bug 6187066
|
||||||
@summary Tests the Window.autoRequestFocus property for the Window.toFront() method.
|
@summary Tests the Window.autoRequestFocus property for the Window.toFront() method.
|
||||||
@author anton.tarasov: area=awt.focus
|
|
||||||
@library /java/awt/patchlib ../../regtesthelpers
|
@library /java/awt/patchlib ../../regtesthelpers
|
||||||
@build java.desktop/java.awt.Helper
|
@build java.desktop/java.awt.Helper
|
||||||
@build Util
|
@build Util
|
||||||
@ -34,13 +33,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class AutoRequestFocusToFrontTest extends Applet {
|
public class AutoRequestFocusToFrontTest {
|
||||||
static boolean haveDelays;
|
static boolean haveDelays;
|
||||||
|
|
||||||
static Frame auxFrame;
|
static Frame auxFrame;
|
||||||
@ -76,10 +71,6 @@ public class AutoRequestFocusToFrontTest extends Applet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
toolkitClassName = Toolkit.getDefaultToolkit().getClass().getName();
|
toolkitClassName = Toolkit.getDefaultToolkit().getClass().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5090325
|
|
||||||
@summary Tests that Window's child can be focused on XAWT.
|
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
|
||||||
@run applet ChildWindowFocusTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ChildWindowFocusTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ChildWindowFocusTest<br>Bug ID: 5090325</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="ChildWindowFocusTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,19 +22,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 5090325
|
@bug 5090325
|
||||||
@summary Tests that Window's child can be focused on XAWT.
|
@summary Tests that Window's child can be focused on XAWT.
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
@run main ChildWindowFocusTest
|
||||||
@run applet ChildWindowFocusTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.lang.reflect.*;
|
|
||||||
|
|
||||||
public class ChildWindowFocusTest extends Applet {
|
public class ChildWindowFocusTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Frame frame = new Frame("Owner");
|
Frame frame = new Frame("Owner");
|
||||||
Button button0 = new Button("button-0");
|
Button button0 = new Button("button-0");
|
||||||
@ -46,16 +44,18 @@ public class ChildWindowFocusTest extends Applet {
|
|||||||
Button button1 = new Button("button-1");
|
Button button1 = new Button("button-1");
|
||||||
int shift;
|
int shift;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
ChildWindowFocusTest app = new ChildWindowFocusTest();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
try {
|
try {
|
||||||
robot = new Robot();
|
robot = new Robot();
|
||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: unable to create robot", e);
|
throw new RuntimeException("Error: unable to create robot", e);
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
shift = 100;
|
shift = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6496958
|
@bug 6496958
|
||||||
@summary Tests that breaking the proccess of clearing LW requests doesn't break focus.
|
@summary Tests that breaking the proccess of clearing LW requests doesn't break focus.
|
||||||
@author anton.tarasov@...: area=awt-focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main ClearLwQueueBreakTest
|
@run main ClearLwQueueBreakTest
|
||||||
@ -35,11 +34,10 @@
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
public class ClearLwQueueBreakTest extends Applet {
|
public class ClearLwQueueBreakTest {
|
||||||
JFrame f1 = new JFrame("frame");
|
JFrame f1 = new JFrame("frame");
|
||||||
JFrame f2 = new JFrame("frame");
|
JFrame f2 = new JFrame("frame");
|
||||||
JButton b = new JButton("button");
|
JButton b = new JButton("button");
|
||||||
@ -60,11 +58,6 @@ public class ClearLwQueueBreakTest extends Applet {
|
|||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
robot = Util.createRobot();
|
robot = Util.createRobot();
|
||||||
|
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
@ -118,6 +111,7 @@ public class ClearLwQueueBreakTest extends Applet {
|
|||||||
f1.add(tf3);
|
f1.add(tf3);
|
||||||
f1.setLayout(new FlowLayout());
|
f1.setLayout(new FlowLayout());
|
||||||
f1.pack();
|
f1.pack();
|
||||||
|
f1.setLocationRelativeTo(null);
|
||||||
f1.setVisible(true);
|
f1.setVisible(true);
|
||||||
Util.waitForIdle(robot);
|
Util.waitForIdle(robot);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,20 +26,15 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6785058
|
@bug 6785058
|
||||||
@summary Tests that an owner is activated on closing its owned dialog with the warning icon.
|
@summary Tests that an owner is activated on closing its owned dialog with the warning icon.
|
||||||
@author Anton Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main/othervm/policy=java.policy -Djava.security.manager CloseDialogActivateOwnerTest
|
@run main/othervm/policy=java.policy -Djava.security.manager CloseDialogActivateOwnerTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class CloseDialogActivateOwnerTest extends Applet {
|
public class CloseDialogActivateOwnerTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,11 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@test %W% %E%
|
@test
|
||||||
@key headful
|
@key headful
|
||||||
@bug 6637607
|
@bug 6637607
|
||||||
@summary Showing a modal dlg on TAB KEY_PRESS shouldn't consume inappropriate KEY_TYPED.
|
@summary Showing a modal dlg on TAB KEY_PRESS shouldn't consume inappropriate KEY_TYPED.
|
||||||
@author Anton Tarasov: area=awt-focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main ConsumeNextKeyTypedOnModalShowTest
|
@run main ConsumeNextKeyTypedOnModalShowTest
|
||||||
@ -34,12 +33,9 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ConsumeNextKeyTypedOnModalShowTest extends Applet {
|
public class ConsumeNextKeyTypedOnModalShowTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Frame frame = new Frame("Frame");
|
Frame frame = new Frame("Frame");
|
||||||
Dialog dialog = new Dialog(frame, "Dialog", true);
|
Dialog dialog = new Dialog(frame, "Dialog", true);
|
||||||
@ -76,6 +72,7 @@ public class ConsumeNextKeyTypedOnModalShowTest extends Applet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
Util.waitTillShown(frame);
|
Util.waitTillShown(frame);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,13 +26,11 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6607170
|
@bug 6607170
|
||||||
@summary Tests for focus-auto-transfer.
|
@summary Tests for focus-auto-transfer.
|
||||||
@author Anton Tarasov: area=awt-focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main ContainerFocusAutoTransferTest
|
@run main ContainerFocusAutoTransferTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.AWTEvent;
|
import java.awt.AWTEvent;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.ComponentOrientation;
|
import java.awt.ComponentOrientation;
|
||||||
@ -50,7 +48,7 @@ import javax.swing.JFrame;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ContainerFocusAutoTransferTest extends Applet {
|
public class ContainerFocusAutoTransferTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
TestFrame frame;
|
TestFrame frame;
|
||||||
KeyboardFocusManager kfm;
|
KeyboardFocusManager kfm;
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6480534
|
|
||||||
@summary A Frame changing its state from ICONIFIED to NORMAL should regain focus.
|
|
||||||
@author anton.tarasov@...: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet DeiconifiedFrameLoosesFocus.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>DeiconifiedFrameLoosesFocus</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>DeiconifiedFrameLoosesFocus<br>Bug ID: 6480534</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=DeiconifiedFrameLoosesFocus.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,18 +22,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6480534
|
@bug 6480534
|
||||||
@summary A Frame changing its state from ICONIFIED to NORMAL should regain focus.
|
@summary A Frame changing its state from ICONIFIED to NORMAL should regain focus.
|
||||||
@author anton.tarasov@...: area=awt.focus
|
@library ../../regtesthelpers
|
||||||
@run applet DeiconifiedFrameLoosesFocus.html
|
@build Util
|
||||||
|
@run main DeiconifiedFrameLoosesFocus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class DeiconifiedFrameLoosesFocus extends Applet {
|
public class DeiconifiedFrameLoosesFocus {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
static final Frame frame = new Frame("Frame");
|
static final Frame frame = new Frame("Frame");
|
||||||
|
|
||||||
@ -45,11 +46,6 @@ public class DeiconifiedFrameLoosesFocus extends Applet {
|
|||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
robot = Util.createRobot();
|
robot = Util.createRobot();
|
||||||
|
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,6 @@
|
|||||||
* @key headful
|
* @key headful
|
||||||
* @bug 6516675
|
* @bug 6516675
|
||||||
* @summary Tests that EmbeddedFrame can be focused.
|
* @summary Tests that EmbeddedFrame can be focused.
|
||||||
* @author anton.tarasov: area=awt-focus
|
|
||||||
* @requires (os.family == "windows")
|
* @requires (os.family == "windows")
|
||||||
* @modules java.desktop/java.awt.peer
|
* @modules java.desktop/java.awt.peer
|
||||||
* java.desktop/sun.awt
|
* java.desktop/sun.awt
|
||||||
@ -39,13 +38,10 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
import test.java.awt.regtesthelpers.UtilInternal;
|
import test.java.awt.regtesthelpers.UtilInternal;
|
||||||
|
|
||||||
public class FocusEmbeddedFrameTest extends Applet {
|
public class FocusEmbeddedFrameTest {
|
||||||
static Frame embedder = new Frame("Embedder");
|
static Frame embedder = new Frame("Embedder");
|
||||||
static Frame ef = null;
|
static Frame ef = null;
|
||||||
static volatile boolean passed;
|
static volatile boolean passed;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,11 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@test FocusOwnerFrameOnClick.java %W% %E%
|
@test
|
||||||
@key headful
|
@key headful
|
||||||
@bug 6886678
|
@bug 6886678
|
||||||
@summary Tests that clicking an owner frame switches focus from its owned window.
|
@summary Tests that clicking an owner frame switches focus from its owned window.
|
||||||
@author Anton Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main FocusOwnerFrameOnClick
|
@run main FocusOwnerFrameOnClick
|
||||||
@ -34,12 +33,10 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class FocusOwnerFrameOnClick extends Applet {
|
public class FocusOwnerFrameOnClick {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Frame frame = new Frame("Frame");
|
Frame frame = new Frame("Frame");
|
||||||
Window window = new Window(frame);
|
Window window = new Window(frame);
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5082319
|
|
||||||
@summary Tests that focus request for already focused component doesn't block key events.
|
|
||||||
@author anton.tarasov@sun.com
|
|
||||||
@run applet FocusSubRequestTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>FocusSubRequestTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>FocusSubRequestTest<br>Bug ID: 5082319</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="FocusSubRequestTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,23 +22,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 5082319
|
@bug 5082319
|
||||||
@summary Tests that focus request for already focused component doesn't block key events.
|
@summary Tests that focus request for already focused component doesn't block key events.
|
||||||
@author anton.tarasov@sun.com
|
@run main FocusSubRequestTest
|
||||||
@run applet FocusSubRequestTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
public class FocusSubRequestTest extends Applet {
|
public class FocusSubRequestTest {
|
||||||
Frame frame = new Frame("Test Frame");
|
Frame frame = new Frame("Test Frame");
|
||||||
Button button = new Button("button");
|
Button button = new Button("button");
|
||||||
boolean passed = false;
|
boolean passed = false;
|
||||||
Robot robot;
|
Robot robot;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
FocusSubRequestTest app = new FocusSubRequestTest();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
frame.add(button);
|
frame.add(button);
|
||||||
button.addFocusListener(new FocusAdapter() {
|
button.addFocusListener(new FocusAdapter() {
|
||||||
@ -64,7 +69,7 @@ public class FocusSubRequestTest extends Applet {
|
|||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
frame.pack();
|
frame.pack();
|
||||||
frame.setLocation(getLocation().x + getSize().width + 20, 0);
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
waitTillShown(button);
|
waitTillShown(button);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,26 +26,19 @@
|
|||||||
* @key headful
|
* @key headful
|
||||||
* @bug 4752312
|
* @bug 4752312
|
||||||
* @summary Tests that after moving non-focusable window it ungrabs mouse pointer
|
* @summary Tests that after moving non-focusable window it ungrabs mouse pointer
|
||||||
* @author Denis Mikhalkin: area=awt.focus
|
|
||||||
* @library ../../regtesthelpers
|
* @library ../../regtesthelpers
|
||||||
* @build Util
|
* @build Util
|
||||||
* @run main FrameJumpingToMouse
|
* @run main FrameJumpingToMouse
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.Dialog;
|
|
||||||
import java.awt.Frame;
|
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
import java.awt.TextArea;
|
|
||||||
import java.awt.Toolkit;
|
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class FrameJumpingToMouse extends Applet
|
public class FrameJumpingToMouse {
|
||||||
{
|
|
||||||
JFrame frame = new JFrame("Test jumping frame");
|
JFrame frame = new JFrame("Test jumping frame");
|
||||||
Robot robot = Util.createRobot();
|
Robot robot = Util.createRobot();
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,18 +26,16 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6522725
|
@bug 6522725
|
||||||
@summary Tests for proper request-focus-back on FOCUS_LOST.
|
@summary Tests for proper request-focus-back on FOCUS_LOST.
|
||||||
@author Anton Tarasov: area=awt-focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main IconifiedFrameFocusChangeTest
|
@run main IconifiedFrameFocusChangeTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class IconifiedFrameFocusChangeTest extends Applet {
|
public class IconifiedFrameFocusChangeTest {
|
||||||
Frame testFrame = new Frame("Test Frame");
|
Frame testFrame = new Frame("Test Frame");
|
||||||
Frame otherFrame = new Frame("Other Frame");
|
Frame otherFrame = new Frame("Other Frame");
|
||||||
Button testButton = new Button("test button");
|
Button testButton = new Button("test button");
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6426132
|
|
||||||
@summary Modal blocked window shouldn't steal focus when shown, or brought to front.
|
|
||||||
@author anton.tarasov@...: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet ModalBlockedStealsFocusTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ModalBlockedStealsFocusTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ModalBlockedStealsFocusTest<br>Bug ID: 6426132</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=ModalBlockedStealsFocusTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,38 +22,30 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6426132
|
@bug 6426132
|
||||||
@summary Modal blocked window shouldn't steal focus when shown, or brought to front.
|
@summary Modal blocked window shouldn't steal focus when shown, or brought to front.
|
||||||
@author anton.tarasov@...: area=awt.focus
|
@library ../../regtesthelpers
|
||||||
@run applet ModalBlockedStealsFocusTest.html
|
@build Util
|
||||||
|
@run main ModalBlockedStealsFocusTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ModalBlockedStealsFocusTest extends Applet {
|
public class ModalBlockedStealsFocusTest {
|
||||||
Frame frame = new Frame("Blocked Frame");
|
Frame frame = new Frame("Blocked Frame");
|
||||||
Dialog dialog = new Dialog(frame, "Modal Dialog", Dialog.ModalityType.TOOLKIT_MODAL);
|
Dialog dialog = new Dialog(frame, "Modal Dialog", Dialog.ModalityType.TOOLKIT_MODAL);
|
||||||
AtomicBoolean lostFocus = new AtomicBoolean(false);
|
AtomicBoolean lostFocus = new AtomicBoolean(false);
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
ModalBlockedStealsFocusTest app = new ModalBlockedStealsFocusTest();
|
ModalBlockedStealsFocusTest app = new ModalBlockedStealsFocusTest();
|
||||||
app.init();
|
|
||||||
app.start();
|
app.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
|
if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
|
||||||
System.out.println("The test is not for MToolkit.");
|
System.out.println("The test is not for MToolkit.");
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6382750
|
|
||||||
@summary
|
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
|
||||||
@run applet ModalDialogInitialFocusTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ModalDialogInitialFocusTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ModalDialogInitialFocusTest<br>Bug ID: 6382750</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=ModalDialogInitialFocusTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,20 +22,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6382750
|
@bug 6382750
|
||||||
@summary Tests that modal dialog doesn't request extra initial focus on show.
|
@summary Tests that modal dialog doesn't request extra initial focus on show.
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
@run main ModalDialogInitialFocusTest
|
||||||
@run applet ModalDialogInitialFocusTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
|
|
||||||
public class ModalDialogInitialFocusTest extends Applet {
|
public class ModalDialogInitialFocusTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
|
|
||||||
Dialog dialog = new Dialog((Window)null, "Test Dialog", Dialog.ModalityType.TOOLKIT_MODAL);
|
Dialog dialog = new Dialog((Window)null, "Test Dialog", Dialog.ModalityType.TOOLKIT_MODAL);
|
||||||
@ -55,10 +52,6 @@ public class ModalDialogInitialFocusTest extends Applet {
|
|||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: unable to create robot", e);
|
throw new RuntimeException("Error: unable to create robot", e);
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6271849
|
|
||||||
@summary Tests that component in modal excluded Window which parent is blocked responses to mouse clicks.
|
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
|
||||||
@modules java.desktop/sun.awt
|
|
||||||
@run applet ModalExcludedWindowClickTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ModalExcludedWindowClickTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ModalExcludedWindowClickTest<br>Bug ID: 6272324</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="ModalExcludedWindowClickTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,19 +22,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6271849
|
@bug 6271849
|
||||||
@summary Tests that component in modal excluded Window which parent is blocked responses to mouse clicks.
|
@summary Tests that component in modal excluded Window which parent is blocked responses to mouse clicks.
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
@modules java.desktop/sun.awt
|
||||||
@run applet ModalExcludedWindowClickTest.html
|
@run main ModalExcludedWindowClickTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
|
|
||||||
public class ModalExcludedWindowClickTest extends Applet {
|
public class ModalExcludedWindowClickTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Frame frame = new Frame("Frame");
|
Frame frame = new Frame("Frame");
|
||||||
Window w = new Window(frame);
|
Window w = new Window(frame);
|
||||||
@ -54,10 +54,6 @@ public class ModalExcludedWindowClickTest extends Applet {
|
|||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: unable to create robot", e);
|
throw new RuntimeException("Error: unable to create robot", e);
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 4685768
|
@bug 4685768
|
||||||
@summary Tests that auto-transfering focus doesn't stuck on a disabled component.
|
@summary Tests that auto-transfering focus doesn't stuck on a disabled component.
|
||||||
@author Anton Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main NoAutotransferToDisabledCompTest
|
@run main NoAutotransferToDisabledCompTest
|
||||||
@ -36,10 +35,9 @@ import java.awt.Robot;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class NoAutotransferToDisabledCompTest extends Applet {
|
public class NoAutotransferToDisabledCompTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
JFrame frame = new JFrame("Frame");
|
JFrame frame = new JFrame("Frame");
|
||||||
JButton b0 = new JButton("b0");
|
JButton b0 = new JButton("b0");
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6272324
|
|
||||||
@summary Modal excluded Window which decorated parent is blocked should be non-focusable.
|
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
|
||||||
@modules java.desktop/sun.awt
|
|
||||||
@run applet NonFocusableBlockedOwnerTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>NonFocusableBlockedOwnerTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>NonFocusableBlockedOwnerTest<br>Bug ID: 6272324</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="NonFocusableBlockedOwnerTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,19 +22,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6272324
|
@bug 6272324
|
||||||
@summary Modal excluded Window which decorated parent is blocked should be non-focusable.
|
@summary Modal excluded Window which decorated parent is blocked should be non-focusable.
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
@modules java.desktop/sun.awt
|
||||||
@run applet NonFocusableBlockedOwnerTest.html
|
@run main NonFocusableBlockedOwnerTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
|
|
||||||
public class NonFocusableBlockedOwnerTest extends Applet {
|
public class NonFocusableBlockedOwnerTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Frame frame = new Frame("Modal Blocked Frame");
|
Frame frame = new Frame("Modal Blocked Frame");
|
||||||
Dialog dialog = new Dialog(frame, "Modal Dialog", true);
|
Dialog dialog = new Dialog(frame, "Modal Dialog", true);
|
||||||
@ -53,10 +53,6 @@ public class NonFocusableBlockedOwnerTest extends Applet {
|
|||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: unable to create robot", e);
|
throw new RuntimeException("Error: unable to create robot", e);
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 6182359
|
@bug 6182359
|
||||||
@summary Tests that Window having non-focusable owner can't be a focus owner.
|
@summary Tests that Window having non-focusable owner can't be a focus owner.
|
||||||
@author Anton.Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main NonfocusableOwnerTest
|
@run main NonfocusableOwnerTest
|
||||||
@ -34,12 +33,9 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.lang.reflect.*;
|
|
||||||
import java.io.*;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class NonfocusableOwnerTest extends Applet {
|
public class NonfocusableOwnerTest {
|
||||||
Robot robot = Util.createRobot();
|
Robot robot = Util.createRobot();
|
||||||
Frame frame;
|
Frame frame;
|
||||||
Dialog dialog;
|
Dialog dialog;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,7 +26,6 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 4685768
|
@bug 4685768
|
||||||
@summary Tests that it's possible to manually request focus on a disabled component.
|
@summary Tests that it's possible to manually request focus on a disabled component.
|
||||||
@author Anton Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main RequestFocusToDisabledCompTest
|
@run main RequestFocusToDisabledCompTest
|
||||||
@ -35,11 +34,9 @@
|
|||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
|
||||||
import java.applet.Applet;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class RequestFocusToDisabledCompTest extends Applet {
|
public class RequestFocusToDisabledCompTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
JFrame frame = new JFrame("Frame");
|
JFrame frame = new JFrame("Frame");
|
||||||
JButton b0 = new JButton("b0");
|
JButton b0 = new JButton("b0");
|
||||||
|
@ -26,15 +26,12 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 8013773
|
@bug 8013773
|
||||||
@summary Tests that disabled component is not retained as most recent focus owner.
|
@summary Tests that disabled component is not retained as most recent focus owner.
|
||||||
@author Anton.Tarasov: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main ResetMostRecentFocusOwnerTest
|
@run main ResetMostRecentFocusOwnerTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.AWTEvent;
|
import java.awt.AWTEvent;
|
||||||
import java.awt.FlowLayout;
|
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.event.AWTEventListener;
|
import java.awt.event.AWTEventListener;
|
||||||
@ -44,15 +41,13 @@ import javax.swing.JButton;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ResetMostRecentFocusOwnerTest extends Applet {
|
public class ResetMostRecentFocusOwnerTest {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
ResetMostRecentFocusOwnerTest app = new ResetMostRecentFocusOwnerTest();
|
ResetMostRecentFocusOwnerTest app = new ResetMostRecentFocusOwnerTest();
|
||||||
app.init();
|
|
||||||
app.start();
|
app.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
|
||||||
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
|
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
|
||||||
@ -68,7 +63,7 @@ public class ResetMostRecentFocusOwnerTest extends Applet {
|
|||||||
final JButton b1 = new JButton("button1");
|
final JButton b1 = new JButton("button1");
|
||||||
frame1.add(b1);
|
frame1.add(b1);
|
||||||
frame1.pack();
|
frame1.pack();
|
||||||
frame1.setLocation(0, 300);
|
frame1.setLocation(100, 300);
|
||||||
|
|
||||||
Util.showWindowWait(frame1);
|
Util.showWindowWait(frame1);
|
||||||
|
|
||||||
|
@ -22,11 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@test %W% %E%
|
@test
|
||||||
@key headful
|
@key headful
|
||||||
@bug 6598089
|
@bug 6598089
|
||||||
@summary Tests restoring focus on a single disabled coponent
|
@summary Tests restoring focus on a single disabled coponent
|
||||||
@author Anton Tarasov: area=awt-focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main RestoreFocusOnDisabledComponentTest
|
@run main RestoreFocusOnDisabledComponentTest
|
||||||
@ -34,13 +33,12 @@
|
|||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The bug is not reproducible on Windows.
|
* The bug is not reproducible on Windows.
|
||||||
*/
|
*/
|
||||||
public class RestoreFocusOnDisabledComponentTest extends Applet {
|
public class RestoreFocusOnDisabledComponentTest {
|
||||||
Frame frame = new Frame("Frame") {public String toString() {return "FRAME";}};
|
Frame frame = new Frame("Frame") {public String toString() {return "FRAME";}};
|
||||||
Button b0 = new Button("button0") {public String toString() {return "B-0";}};
|
Button b0 = new Button("button0") {public String toString() {return "B-0";}};
|
||||||
Button b1 = new Button("button1") {public String toString() {return "B-1";}};
|
Button b1 = new Button("button1") {public String toString() {return "B-1";}};
|
||||||
@ -62,7 +60,7 @@ public class RestoreFocusOnDisabledComponentTest extends Applet {
|
|||||||
frame.add(b1);
|
frame.add(b1);
|
||||||
frame.setLayout(new FlowLayout());
|
frame.setLayout(new FlowLayout());
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
Util.waitForIdle(robot);
|
Util.waitForIdle(robot);
|
||||||
|
@ -28,18 +28,14 @@
|
|||||||
@summary Tests that showing a toplvel in a not foreground Java process activates it.
|
@summary Tests that showing a toplvel in a not foreground Java process activates it.
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@author Anton Tarasov: area=awt-focus
|
|
||||||
@run main ShowFrameCheckForegroundTest
|
@run main ShowFrameCheckForegroundTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ShowFrameCheckForegroundTest extends Applet {
|
public class ShowFrameCheckForegroundTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
Frame nofocusFrame = new Frame("Non-focusable");
|
Frame nofocusFrame = new Frame("Non-focusable");
|
||||||
Frame frame = new Frame("Frame");
|
Frame frame = new Frame("Frame");
|
||||||
@ -76,6 +72,7 @@ public class ShowFrameCheckForegroundTest extends Applet {
|
|||||||
nofocusFrame.add(showButton);
|
nofocusFrame.add(showButton);
|
||||||
nofocusFrame.pack();
|
nofocusFrame.pack();
|
||||||
nofocusFrame.setFocusableWindowState(false);
|
nofocusFrame.setFocusableWindowState(false);
|
||||||
|
nofocusFrame.setLocation(200, 200);
|
||||||
nofocusFrame.setVisible(true);
|
nofocusFrame.setVisible(true);
|
||||||
Util.waitForIdle(robot);
|
Util.waitForIdle(robot);
|
||||||
|
|
||||||
@ -97,7 +94,7 @@ public class ShowFrameCheckForegroundTest extends Applet {
|
|||||||
private void test(Window toplevel, int stage) {
|
private void test(Window toplevel, int stage) {
|
||||||
toplevel.add(testButton);
|
toplevel.add(testButton);
|
||||||
toplevel.pack();
|
toplevel.pack();
|
||||||
toplevel.setLocation(200, 0);
|
toplevel.setLocation(400, 200);
|
||||||
|
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4092033 4529626
|
|
||||||
@summary Tests that toFront makes window focused unless it is non-focusable
|
|
||||||
@author area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet ToFrontFocus.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ToFrontFocus<br>
|
|
||||||
4092033 : (P4/S5) - window.toFront() method is now also setting focus
|
|
||||||
4529626 : (P4/S2) - REGRESSION:In solaris and Linux ,toFront() is not making frame as the Focused.
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="ToFrontFocus.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,39 +22,32 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 4092033 4529626
|
@bug 4092033 4529626
|
||||||
@summary Tests that toFront makes window focused unless it is non-focusable
|
@summary Tests that toFront makes window focused unless it is non-focusable
|
||||||
@author area=awt.focus
|
@library ../../regtesthelpers
|
||||||
@run applet ToFrontFocus.html
|
@build Util
|
||||||
|
@run main ToFrontFocus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* ToFrontFocus.java
|
|
||||||
*
|
|
||||||
* summary:
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ToFrontFocus extends Applet
|
public class ToFrontFocus {
|
||||||
{
|
|
||||||
//Declare things used in the test, like buttons and labels here
|
|
||||||
|
|
||||||
Frame cover, focus_frame, nonfocus_frame;
|
Frame cover, focus_frame, nonfocus_frame;
|
||||||
Button focus_button, nonfocus_button;
|
Button focus_button, nonfocus_button;
|
||||||
volatile boolean focus_gained = false, nonfocus_gained = false;
|
volatile boolean focus_gained = false, nonfocus_gained = false;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
ToFrontFocus app = new ToFrontFocus();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
//Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
cover = new Frame("Cover frame");
|
cover = new Frame("Cover frame");
|
||||||
cover.setBounds(100, 100, 200, 200);
|
cover.setBounds(100, 100, 200, 200);
|
||||||
focus_frame = new Frame("Focusable frame");
|
focus_frame = new Frame("Focusable frame");
|
||||||
@ -78,9 +71,6 @@ public class ToFrontFocus extends Applet
|
|||||||
|
|
||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
//Get things going. Request focus, set size, et cetera
|
|
||||||
setSize (200,200);
|
|
||||||
show();
|
|
||||||
Util.waitForIdle(null);
|
Util.waitForIdle(null);
|
||||||
|
|
||||||
focus_frame.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy() {
|
focus_frame.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy() {
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6426132
|
|
||||||
@summary A Window should be focused upon start (XAWT bug).
|
|
||||||
@author anton.tarasov@...: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet WindowInitialFocusTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>WindowInitialFocusTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>WindowInitialFocusTest<br>Bug ID: 6426132</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=WindowInitialFocusTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,20 +22,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6426132
|
@bug 6426132
|
||||||
@summary A Window should be initially focused on its showing (XAWT bug).
|
@summary A Window should be focused upon start (XAWT bug).
|
||||||
@author anton.tarasov@...: area=awt.focus
|
@library ../../regtesthelpers
|
||||||
@run applet WindowInitialFocusTest.html
|
@build Util
|
||||||
|
@run main WindowInitialFocusTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class WindowInitialFocusTest extends Applet {
|
public class WindowInitialFocusTest {
|
||||||
Frame frame = new Frame("Test Frame");
|
Frame frame = new Frame("Test Frame");
|
||||||
Window window = new Window(frame);
|
Window window = new Window(frame);
|
||||||
Button button = new Button("button");
|
Button button = new Button("button");
|
||||||
@ -44,17 +45,9 @@ public class WindowInitialFocusTest extends Applet {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
WindowInitialFocusTest app = new WindowInitialFocusTest();
|
WindowInitialFocusTest app = new WindowInitialFocusTest();
|
||||||
app.init();
|
|
||||||
app.start();
|
app.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
frame.setBounds(800, 0, 200, 100);
|
frame.setBounds(800, 0, 200, 100);
|
||||||
window.setBounds(800, 200, 200, 100);
|
window.setBounds(800, 200, 200, 100);
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6253913
|
|
||||||
@summary Tests that a Window shown before its owner is focusable.
|
|
||||||
@author anton.tarasov@sun.com: area=awt-focus
|
|
||||||
@modules java.desktop/sun.awt
|
|
||||||
@run applet WindowUpdateFocusabilityTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>WindowUpdateFocusabilityTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>WindowUpdateFocusabilityTest<br>Bug ID: 6253913</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=WindowUpdateFocusabilityTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,19 +22,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6253913
|
@bug 6253913
|
||||||
@summary Tests that a Window shown before its owner is focusable.
|
@summary Tests that a Window shown before its owner is focusable.
|
||||||
@author anton.tarasov@sun.com: area=awt-focus
|
@modules java.desktop/sun.awt
|
||||||
@run applet WindowUpdateFocusabilityTest.html
|
@run main WindowUpdateFocusabilityTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
|
|
||||||
public class WindowUpdateFocusabilityTest extends Applet {
|
public class WindowUpdateFocusabilityTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
boolean focusGained = false;
|
boolean focusGained = false;
|
||||||
final Object monitor = new Object();
|
final Object monitor = new Object();
|
||||||
@ -60,10 +60,6 @@ public class WindowUpdateFocusabilityTest extends Applet {
|
|||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: couldn't create robot");
|
throw new RuntimeException("Error: couldn't create robot");
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,24 +26,15 @@
|
|||||||
@key headful
|
@key headful
|
||||||
@bug 4782886
|
@bug 4782886
|
||||||
@summary FocusManager consumes wrong KEY_TYPED events
|
@summary FocusManager consumes wrong KEY_TYPED events
|
||||||
@author Oleg.Sukhodolsky: area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run main WrongKeyTypedConsumedTest
|
@run main WrongKeyTypedConsumedTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.AWTException;
|
|
||||||
import java.awt.AWTKeyStroke;
|
import java.awt.AWTKeyStroke;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Dialog;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.FlowLayout;
|
|
||||||
import java.awt.Frame;
|
|
||||||
import java.awt.KeyboardFocusManager;
|
import java.awt.KeyboardFocusManager;
|
||||||
import java.awt.Point;
|
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
import java.awt.TextArea;
|
|
||||||
|
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
@ -56,7 +47,7 @@ import javax.swing.JTextArea;
|
|||||||
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class WrongKeyTypedConsumedTest extends Applet
|
public class WrongKeyTypedConsumedTest
|
||||||
{
|
{
|
||||||
Robot robot = Util.createRobot();
|
Robot robot = Util.createRobot();
|
||||||
|
|
||||||
@ -67,10 +58,6 @@ public class WrongKeyTypedConsumedTest extends Applet
|
|||||||
|
|
||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
setSize (200,200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
JFrame frame = new JFrame("The Frame");
|
JFrame frame = new JFrame("The Frame");
|
||||||
Set ftk = new HashSet();
|
Set ftk = new HashSet();
|
||||||
ftk.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_DOWN, 0));
|
ftk.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_DOWN, 0));
|
||||||
@ -85,6 +72,7 @@ public class WrongKeyTypedConsumedTest extends Applet
|
|||||||
frame.getContentPane().add(textarea);
|
frame.getContentPane().add(textarea);
|
||||||
|
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
Util.waitForIdle(robot);
|
Util.waitForIdle(robot);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -21,12 +21,23 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.*;
|
import java.awt.Font;
|
||||||
import java.awt.*;
|
import java.awt.FontFormatException;
|
||||||
import java.io.*;
|
import java.io.BufferedInputStream;
|
||||||
import java.net.*;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
public class BigFont extends Applet {
|
/**
|
||||||
|
* @test
|
||||||
|
* @key headful
|
||||||
|
* @bug 6522586
|
||||||
|
* @summary Enforce limits on font creation
|
||||||
|
* @run main BigFont 1 A.ttf
|
||||||
|
* @run main BigFont 2 A.ttf
|
||||||
|
*/
|
||||||
|
public class BigFont {
|
||||||
|
|
||||||
static private class SizedInputStream extends InputStream {
|
static private class SizedInputStream extends InputStream {
|
||||||
|
|
||||||
@ -51,12 +62,12 @@ public class BigFont extends Applet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String id;
|
static String id;
|
||||||
String fileName;
|
static String fileName;
|
||||||
|
|
||||||
public void init() {
|
public static void main(final String[] args) {
|
||||||
id = getParameter("number");
|
id = args[0];
|
||||||
fileName = getParameter("font");
|
fileName = args[1];
|
||||||
|
|
||||||
System.out.println("Applet " + id + " "+
|
System.out.println("Applet " + id + " "+
|
||||||
Thread.currentThread().getThreadGroup());
|
Thread.currentThread().getThreadGroup());
|
||||||
@ -102,7 +113,10 @@ public class BigFont extends Applet {
|
|||||||
|
|
||||||
int getFileSize(String fileName) {
|
int getFileSize(String fileName) {
|
||||||
try {
|
try {
|
||||||
URL url = new URL(getCodeBase(), fileName);
|
String path = Paths.get(System.getProperty("test.src", "."),
|
||||||
|
fileName).toAbsolutePath().normalize()
|
||||||
|
.toString();
|
||||||
|
URL url = new URL(path);
|
||||||
InputStream inStream = url.openStream();
|
InputStream inStream = url.openStream();
|
||||||
BufferedInputStream fontStream = new BufferedInputStream(inStream);
|
BufferedInputStream fontStream = new BufferedInputStream(inStream);
|
||||||
int size = 0;
|
int size = 0;
|
||||||
@ -123,7 +137,10 @@ public class BigFont extends Applet {
|
|||||||
boolean gotException = false;
|
boolean gotException = false;
|
||||||
for (int i=0; i<fontCnt; i++) {
|
for (int i=0; i<fontCnt; i++) {
|
||||||
try {
|
try {
|
||||||
URL url = new URL(getCodeBase(), fileName);
|
String path = Paths.get(System.getProperty("test.src", "."),
|
||||||
|
fileName).toAbsolutePath().normalize()
|
||||||
|
.toString();
|
||||||
|
URL url = new URL(path);
|
||||||
InputStream inStream = url.openStream();
|
InputStream inStream = url.openStream();
|
||||||
BufferedInputStream fontStream =
|
BufferedInputStream fontStream =
|
||||||
new BufferedInputStream(inStream);
|
new BufferedInputStream(inStream);
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6522586
|
|
||||||
@run applet bigfont.html
|
|
||||||
@summary Enforce limits on font creation
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Test Font Creation Limits</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<hr>
|
|
||||||
<APPLET CODE = BigFont.class WIDTH = 100 HEIGHT = 100 >
|
|
||||||
<param name="number" value="1">
|
|
||||||
<param name="font" value="A.ttf">
|
|
||||||
</APPLET>
|
|
||||||
<APPLET CODE = BigFont.class WIDTH = 100 HEIGHT = 100>
|
|
||||||
<param name="number" value="2">
|
|
||||||
<param name="font" value="A.ttf">
|
|
||||||
</APPLET>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4051487 4145670
|
|
||||||
@summary Tests that disposing of an empty Frame or a Frame with a MenuBar
|
|
||||||
while it is being created does not crash the VM.
|
|
||||||
@author dpm area=Threads
|
|
||||||
@run applet/timeout=7200 DisposeStressTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>DisposeStressTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>DisposeStressTest<br>Bug ID: 4051487, 4145670</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="DisposeStressTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -21,67 +21,23 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
@bug 4051487 4145670 8062021
|
@key headful
|
||||||
|
@bug 4051487 4145670
|
||||||
@summary Tests that disposing of an empty Frame or a Frame with a MenuBar
|
@summary Tests that disposing of an empty Frame or a Frame with a MenuBar
|
||||||
while it is being created does not crash the VM.
|
while it is being created does not crash the VM.
|
||||||
@author dpm area=Threads
|
@run main/timeout=7200 DisposeStressTest
|
||||||
@run applet/timeout=7200 DisposeStressTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Note there is no @ in front of test above. This is so that the
|
import java.awt.Frame;
|
||||||
// harness will not mistake this file as a test file. It should
|
import java.awt.Menu;
|
||||||
// only see the html file as a test file. (the harness runs all
|
import java.awt.MenuBar;
|
||||||
// valid test files, so it would run this test twice if this file
|
import java.awt.MenuItem;
|
||||||
// were valid as well as the html file.)
|
|
||||||
// Also, note the area= after Your Name in the author tag. Here, you
|
|
||||||
// should put which functional area the test falls in. See the
|
|
||||||
// AWT-core home page -> test areas and/or -> AWT team for a list of
|
|
||||||
// areas.
|
|
||||||
// Note also the 'DisposeStressTest.html' in the run tag. This should
|
|
||||||
// be changed to the name of the test.
|
|
||||||
|
|
||||||
|
public class DisposeStressTest {
|
||||||
|
|
||||||
/**
|
public static void main(final String[] args) {
|
||||||
* DisposeStressTest.java
|
|
||||||
*
|
|
||||||
* summary:
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
|
||||||
|
|
||||||
|
|
||||||
//Automated tests should run as applet tests if possible because they
|
|
||||||
// get their environments cleaned up, including AWT threads, any
|
|
||||||
// test created threads, and any system resources used by the test
|
|
||||||
// such as file descriptors. (This is normally not a problem as
|
|
||||||
// main tests usually run in a separate VM, however on some platforms
|
|
||||||
// such as the Mac, separate VMs are not possible and non-applet
|
|
||||||
// tests will cause problems). Also, you don't have to worry about
|
|
||||||
// synchronisation stuff in Applet tests they way you do in main
|
|
||||||
// tests...
|
|
||||||
|
|
||||||
|
|
||||||
public class DisposeStressTest extends Applet
|
|
||||||
{
|
|
||||||
//Declare things used in the test, like buttons and labels here
|
|
||||||
|
|
||||||
public void init()
|
|
||||||
{
|
|
||||||
//Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start ()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 1000; i++) {
|
for (int i = 0; i < 1000; i++) {
|
||||||
Frame f = new Frame();
|
Frame f = new Frame();
|
||||||
f.setBounds(10, 10, 10, 10);
|
f.setBounds(10, 10, 10, 10);
|
||||||
@ -98,6 +54,5 @@ public class DisposeStressTest extends Applet
|
|||||||
f2.show();
|
f2.show();
|
||||||
f2.dispose();
|
f2.dispose();
|
||||||
}
|
}
|
||||||
}// start()
|
}
|
||||||
|
}
|
||||||
}// class DisposeStressTest
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
<html>
|
|
||||||
<!--
|
|
||||||
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4828019
|
|
||||||
@summary Frame/Window deadlock
|
|
||||||
@author yan@sparc.spb.su: area=
|
|
||||||
@run applet/timeout=9999 NonEDT_GUI_Deadlock.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>NonEDT_GUI_Deadlock<br>Bug ID: 4828019</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="NonEDT_GUI_Deadlock.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -21,70 +21,22 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 4828019
|
@bug 4828019
|
||||||
@summary Frame/Window deadlock
|
@summary Frame/Window deadlock
|
||||||
@author yan@sparc.spb.su: area=
|
@run main/timeout=9999 NonEDT_GUI_Deadlock
|
||||||
@run applet NonEDT_GUI_Deadlock.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Note there is no @ in front of test above. This is so that the
|
|
||||||
// harness will not mistake this file as a test file. It should
|
|
||||||
// only see the html file as a test file. (the harness runs all
|
|
||||||
// valid test files, so it would run this test twice if this file
|
|
||||||
// were valid as well as the html file.)
|
|
||||||
// Also, note the area= after Your Name in the author tag. Here, you
|
|
||||||
// should put which functional area the test falls in. See the
|
|
||||||
// AWT-core home page -> test areas and/or -> AWT team for a list of
|
|
||||||
// areas.
|
|
||||||
// Note also the 'AutomaticAppletTest.html' in the run tag. This should
|
|
||||||
// be changed to the name of the test.
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NonEDT_GUI_Deadlock.java
|
|
||||||
*
|
|
||||||
* summary:
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
|
||||||
import java.net.*;
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
|
public class NonEDT_GUI_Deadlock {
|
||||||
//Automated tests should run as applet tests if possible because they
|
|
||||||
// get their environments cleaned up, including AWT threads, any
|
|
||||||
// test created threads, and any system resources used by the test
|
|
||||||
// such as file descriptors. (This is normally not a problem as
|
|
||||||
// main tests usually run in a separate VM, however on some platforms
|
|
||||||
// such as the Mac, separate VMs are not possible and non-applet
|
|
||||||
// tests will cause problems). Also, you don't have to worry about
|
|
||||||
// synchronisation stuff in Applet tests they way you do in main
|
|
||||||
// tests...
|
|
||||||
|
|
||||||
|
|
||||||
public class NonEDT_GUI_Deadlock extends Applet
|
|
||||||
{
|
|
||||||
//Declare things used in the test, like buttons and labels here
|
|
||||||
boolean bOK = false;
|
boolean bOK = false;
|
||||||
Thread badThread = null;
|
Thread badThread = null;
|
||||||
|
|
||||||
public void init()
|
|
||||||
{
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
//Get things going. Request focus, set size, et cetera
|
|
||||||
|
|
||||||
setSize (200,300);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
final Frame theFrame = new Frame("Window test");
|
final Frame theFrame = new Frame("Window test");
|
||||||
theFrame.setSize(240, 200);
|
theFrame.setSize(240, 200);
|
||||||
|
|
||||||
@ -164,7 +116,6 @@ public class NonEDT_GUI_Deadlock extends Applet
|
|||||||
|
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
NonEDT_GUI_Deadlock imt = new NonEDT_GUI_Deadlock();
|
NonEDT_GUI_Deadlock imt = new NonEDT_GUI_Deadlock();
|
||||||
imt.init();
|
|
||||||
imt.start();
|
imt.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -30,12 +30,10 @@
|
|||||||
* on older Gnome versions (see bug 6500686).
|
* on older Gnome versions (see bug 6500686).
|
||||||
* @run main FSFrame
|
* @run main FSFrame
|
||||||
* @run main/othervm -Dsun.java2d.noddraw=true FSFrame
|
* @run main/othervm -Dsun.java2d.noddraw=true FSFrame
|
||||||
* @author cheth
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.*;
|
import java.awt.image.*;
|
||||||
import java.applet.*;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<html>
|
|
||||||
<!--
|
|
||||||
|
|
||||||
Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5004032
|
|
||||||
@summary GridBagConstraints.ipad(x|y) defined in a new way
|
|
||||||
@author dav@sparc.spb.su area=
|
|
||||||
@run applet GridBagLayoutIpadXYTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>GridBagLayoutIpadXYTest<br>Bug ID: 5004032 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="GridBagLayoutIpadXYTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -22,32 +22,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 5004032
|
@bug 5004032
|
||||||
@summary GridBagConstraints.ipad(x|y) defined in a new way
|
@summary GridBagConstraints.ipad(x|y) defined in a new way
|
||||||
@author dav@sparc.spb.su area=
|
@run main GridBagLayoutIpadXYTest
|
||||||
@run applet GridBagLayoutIpadXYTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
public class GridBagLayoutIpadXYTest extends Applet
|
public class GridBagLayoutIpadXYTest {
|
||||||
{
|
static Frame frame = new Frame();
|
||||||
Frame frame = new Frame();
|
static TextField jtf = null;
|
||||||
TextField jtf = null;
|
static final int customIpadx = 300;
|
||||||
final int customIpadx = 300;
|
static final int customIpady = 40;
|
||||||
final int customIpady = 40;
|
|
||||||
|
|
||||||
public void init()
|
public static void main(final String[] args) {
|
||||||
{
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start ()
|
|
||||||
{
|
|
||||||
validate();
|
|
||||||
frame.setLayout(new GridBagLayout());
|
frame.setLayout(new GridBagLayout());
|
||||||
GridBagConstraints gc = new GridBagConstraints();
|
GridBagConstraints gc = new GridBagConstraints();
|
||||||
Insets fieldInsets = new Insets(0,5,5,0);
|
Insets fieldInsets = new Insets(0,5,5,0);
|
||||||
@ -64,6 +54,7 @@ public class GridBagLayoutIpadXYTest extends Applet
|
|||||||
frame.add(jtf, gc);
|
frame.add(jtf, gc);
|
||||||
|
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
Robot robot;
|
Robot robot;
|
||||||
@ -86,6 +77,5 @@ public class GridBagLayoutIpadXYTest extends Applet
|
|||||||
throw new RuntimeException("Test Failed. TextField has incorrect width. ");
|
throw new RuntimeException("Test Failed. TextField has incorrect width. ");
|
||||||
}
|
}
|
||||||
System.out.println("Test Passed.");
|
System.out.println("Test Passed.");
|
||||||
|
}
|
||||||
}// start()
|
|
||||||
}
|
}
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6391688
|
|
||||||
@summary Tests that next mnemonic KeyTyped is consumed for a modal dialog.
|
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
|
||||||
@run applet ConsumeForModalDialogTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ConsumeForModalDialogTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ConsumeForModalDialogTest<br>Bug ID: 6391688</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=ConsumeForModalDialogTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -20,22 +20,20 @@
|
|||||||
* or visit www.oracle.com if you need additional information or have any
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6391688
|
@bug 6391688
|
||||||
@summary Tests that next mnemonic KeyTyped is consumed for a modal dialog.
|
@summary Tests that next mnemonic KeyTyped is consumed for a modal dialog.
|
||||||
@author anton.tarasov@sun.com: area=awt.focus
|
@run main ConsumeForModalDialogTest
|
||||||
@run applet ConsumeForModalDialogTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
|
|
||||||
public class ConsumeForModalDialogTest extends Applet {
|
public class ConsumeForModalDialogTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
JFrame frame = new JFrame("Test Frame");
|
JFrame frame = new JFrame("Test Frame");
|
||||||
JDialog dialog = new JDialog((Window)null, "Test Dialog", Dialog.ModalityType.DOCUMENT_MODAL);
|
JDialog dialog = new JDialog((Window)null, "Test Dialog", Dialog.ModalityType.DOCUMENT_MODAL);
|
||||||
@ -55,10 +53,6 @@ public class ConsumeForModalDialogTest extends Applet {
|
|||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: unable to create robot", e);
|
throw new RuntimeException("Error: unable to create robot", e);
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
@ -93,6 +87,7 @@ public class ConsumeForModalDialogTest extends Applet {
|
|||||||
|
|
||||||
frame.setJMenuBar(menuBar);
|
frame.setJMenuBar(menuBar);
|
||||||
frame.setSize(100, 100);
|
frame.setSize(100, 100);
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
robot.waitForIdle();
|
robot.waitForIdle();
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6346690
|
|
||||||
@summary Tests that key_typed is consumed after mnemonic key_pressed is handled for a menu item.
|
|
||||||
@author anton.tarasov@sun.com: area=awt-focus
|
|
||||||
@library /test/lib
|
|
||||||
@build jdk.test.lib.Platform
|
|
||||||
@run applet ConsumeNextMnemonicKeyTypedTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ConsumeNextMnemonicKeyTypedTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ConsumeNextMnemonicKeyTypedTest<br>Bug ID: 6346690</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=ConsumeNextMnemonicKeyTypedTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,13 +22,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6346690
|
@bug 6346690
|
||||||
@summary Tests that key_typed is consumed after mnemonic key_pressed is handled for a menu item.
|
@summary Tests that key_typed is consumed after mnemonic key_pressed is handled for a menu item.
|
||||||
@author anton.tarasov@sun.com: area=awt-focus
|
|
||||||
@library /test/lib
|
@library /test/lib
|
||||||
@build jdk.test.lib.Platform
|
@build jdk.test.lib.Platform
|
||||||
@run applet ConsumeNextMnemonicKeyTypedTest.html
|
@run main ConsumeNextMnemonicKeyTypedTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import jdk.test.lib.Platform;
|
import jdk.test.lib.Platform;
|
||||||
@ -36,10 +36,8 @@ import jdk.test.lib.Platform;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
|
|
||||||
|
public class ConsumeNextMnemonicKeyTypedTest {
|
||||||
public class ConsumeNextMnemonicKeyTypedTest extends Applet {
|
|
||||||
Robot robot;
|
Robot robot;
|
||||||
JFrame frame = new JFrame("Test Frame");
|
JFrame frame = new JFrame("Test Frame");
|
||||||
JTextField text = new JTextField();
|
JTextField text = new JTextField();
|
||||||
@ -60,10 +58,6 @@ public class ConsumeNextMnemonicKeyTypedTest extends Applet {
|
|||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
throw new RuntimeException("Error: unable to create robot", e);
|
throw new RuntimeException("Error: unable to create robot", e);
|
||||||
}
|
}
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
@ -76,7 +70,7 @@ public class ConsumeNextMnemonicKeyTypedTest extends Applet {
|
|||||||
frame.setJMenuBar(bar);
|
frame.setJMenuBar(bar);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
|
||||||
frame.setLocation(800, 0);
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6396785
|
|
||||||
@summary Action key pressed on a button should be swallowed.
|
|
||||||
@author anton.tarasov@...: area=awt.focus
|
|
||||||
@library ../../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet ButtonActionKeyTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ButtonActionKeyTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ButtonActionKeyTest<br>Bug ID: 6396785</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=ButtonActionKeyTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,22 +22,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6396785
|
@bug 6396785
|
||||||
@summary Action key pressed on a button should be swallowed.
|
@summary Action key pressed on a button should be swallowed.
|
||||||
@author anton.tarasov@...: area=awt.focus
|
@library ../../../regtesthelpers
|
||||||
@run applet ButtonActionKeyTest.html
|
@build Util
|
||||||
|
@run main ButtonActionKeyTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class ButtonActionKeyTest extends Applet {
|
public class ButtonActionKeyTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
JFrame frame = new JFrame("Frame");
|
JFrame frame = new JFrame("Frame");
|
||||||
JButton button = new JButton("button");
|
JButton button = new JButton("button");
|
||||||
@ -52,11 +52,6 @@ public class ButtonActionKeyTest extends Applet {
|
|||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
robot = Util.createRobot();
|
robot = Util.createRobot();
|
||||||
|
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
@ -84,7 +79,7 @@ public class ButtonActionKeyTest extends Applet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
Util.waitForIdle(robot);
|
Util.waitForIdle(robot);
|
||||||
|
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6396785
|
|
||||||
@summary MenuItem activated with space should swallow this space.
|
|
||||||
@author anton.tarasov@...: area=awt.focus
|
|
||||||
@library ../../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet MenuItemActivatedTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>MenuItemActivatedTest</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>MenuItemActivatedTest<br>Bug ID: 6396785</h1>
|
|
||||||
|
|
||||||
<p>See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE=MenuItemActivatedTest.class WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -22,22 +22,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6396785
|
@bug 6396785
|
||||||
@summary MenuItem activated with space should swallow this space.
|
@summary MenuItem activated with space should swallow this space.
|
||||||
@author anton.tarasov@...: area=awt.focus
|
@library ../../../regtesthelpers
|
||||||
@run applet MenuItemActivatedTest.html
|
@build Util
|
||||||
|
@run main MenuItemActivatedTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class MenuItemActivatedTest extends Applet {
|
public class MenuItemActivatedTest {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
JFrame frame = new JFrame("Test Frame");
|
JFrame frame = new JFrame("Test Frame");
|
||||||
JDialog dialog = new JDialog((Window)null, "Test Dialog", Dialog.ModalityType.DOCUMENT_MODAL);
|
JDialog dialog = new JDialog((Window)null, "Test Dialog", Dialog.ModalityType.DOCUMENT_MODAL);
|
||||||
@ -55,11 +55,6 @@ public class MenuItemActivatedTest extends Applet {
|
|||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
robot = Util.createRobot();
|
robot = Util.createRobot();
|
||||||
|
|
||||||
// Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
@ -68,6 +63,7 @@ public class MenuItemActivatedTest extends Applet {
|
|||||||
bar.add(menu);
|
bar.add(menu);
|
||||||
frame.setJMenuBar(bar);
|
frame.setJMenuBar(bar);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
|
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent ae) {
|
public void actionPerformed(ActionEvent ae) {
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4799136
|
|
||||||
@summary Tests that type-ahead for dialog works and doesn't block program
|
|
||||||
@author area=awt.focus
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@modules java.desktop/sun.awt
|
|
||||||
@build Util
|
|
||||||
@run applet TestDialogTypeAhead.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>TestDialogTypeAhead<br>Bug ID: 4799136 Tests that type-ahead for dialog works and doesn't block program </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="TestDialogTypeAhead.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -22,51 +22,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
@bug 4799136
|
@key headful
|
||||||
@summary Tests that type-ahead for dialog works and doesn't block program
|
@bug 4799136
|
||||||
@author area=awt.focus
|
@summary Tests that type-ahead for dialog works and doesn't block program
|
||||||
@run applet TestDialogTypeAhead.html
|
@library ../../regtesthelpers
|
||||||
|
@modules java.desktop/sun.awt
|
||||||
|
@build Util
|
||||||
|
@run main TestDialogTypeAhead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Note there is no @ in front of test above. This is so that the
|
|
||||||
// harness will not mistake this file as a test file. It should
|
|
||||||
// only see the html file as a test file. (the harness runs all
|
|
||||||
// valid test files, so it would run this test twice if this file
|
|
||||||
// were valid as well as the html file.)
|
|
||||||
// Also, note the area= after Your Name in the author tag. Here, you
|
|
||||||
// should put which functional area the test falls in. See the
|
|
||||||
// AWT-core home page -> test areas and/or -> AWT team for a list of
|
|
||||||
// areas.
|
|
||||||
// Note also the 'TestDialogTypeAhead.html' in the run tag. This should
|
|
||||||
// be changed to the name of the test.
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TestDialogTypeAhead.java
|
|
||||||
*
|
|
||||||
* summary:
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
|
||||||
|
|
||||||
//Automated tests should run as applet tests if possible because they
|
public class TestDialogTypeAhead {
|
||||||
// get their environments cleaned up, including AWT threads, any
|
|
||||||
// test created threads, and any system resources used by the test
|
|
||||||
// such as file descriptors. (This is normally not a problem as
|
|
||||||
// main tests usually run in a separate VM, however on some platforms
|
|
||||||
// such as the Mac, separate VMs are not possible and non-applet
|
|
||||||
// tests will cause problems). Also, you don't have to worry about
|
|
||||||
// synchronisation stuff in Applet tests they way you do in main
|
|
||||||
// tests...
|
|
||||||
|
|
||||||
|
|
||||||
public class TestDialogTypeAhead extends Applet
|
|
||||||
{
|
|
||||||
//Declare things used in the test, like buttons and labels here
|
//Declare things used in the test, like buttons and labels here
|
||||||
static Frame f;
|
static Frame f;
|
||||||
static Button b;
|
static Button b;
|
||||||
@ -76,12 +46,15 @@ public class TestDialogTypeAhead extends Applet
|
|||||||
static Semaphore robotSema = new Semaphore();
|
static Semaphore robotSema = new Semaphore();
|
||||||
static volatile boolean gotFocus = false;
|
static volatile boolean gotFocus = false;
|
||||||
static Robot robot;
|
static Robot robot;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
TestDialogTypeAhead app = new TestDialogTypeAhead();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
//Create instructions for the user here, as well as set up
|
|
||||||
// the environment -- set the layout manager, add buttons,
|
|
||||||
// etc.
|
|
||||||
|
|
||||||
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
|
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
|
||||||
public void eventDispatched(AWTEvent e) {
|
public void eventDispatched(AWTEvent e) {
|
||||||
System.err.println(e.toString());
|
System.err.println(e.toString());
|
||||||
@ -90,8 +63,6 @@ public class TestDialogTypeAhead extends Applet
|
|||||||
|
|
||||||
KeyboardFocusManager.setCurrentKeyboardFocusManager(new TestKFM());
|
KeyboardFocusManager.setCurrentKeyboardFocusManager(new TestKFM());
|
||||||
|
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
f = new Frame("frame");
|
f = new Frame("frame");
|
||||||
b = new Button("press");
|
b = new Button("press");
|
||||||
d = new Dialog(f, "dialog", true);
|
d = new Dialog(f, "dialog", true);
|
||||||
@ -139,16 +110,12 @@ public class TestDialogTypeAhead extends Applet
|
|||||||
|
|
||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
//Get things going. Request focus, set size, et cetera
|
|
||||||
setSize (200,200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
try {
|
try {
|
||||||
robot = new Robot();
|
robot = new Robot();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException("Can't create robot:" + e);
|
throw new RuntimeException("Can't create robot:" + e);
|
||||||
}
|
}
|
||||||
|
f.setLocationRelativeTo(null);
|
||||||
f.setVisible(true);
|
f.setVisible(true);
|
||||||
waitTillShown(b);
|
waitTillShown(b);
|
||||||
System.err.println("b is shown");
|
System.err.println("b is shown");
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<html>
|
|
||||||
<!--
|
|
||||||
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6299858
|
|
||||||
@summary PIT. Focused border not shown on List if selected item is removed, XToolkit
|
|
||||||
@author Dmitry.Cherepanov@SUN.COM area=awt.list
|
|
||||||
@library /test/lib
|
|
||||||
@build jdk.test.lib.Platform
|
|
||||||
@run applet FirstItemRemoveTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>FirstItemRemoveTest<br>Bug ID: 6299858 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="FirstItemRemoveTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -22,24 +22,31 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
@bug 6299858 7124338
|
@key headful
|
||||||
|
@bug 6299858
|
||||||
@summary PIT. Focused border not shown on List if selected item is removed, XToolkit
|
@summary PIT. Focused border not shown on List if selected item is removed, XToolkit
|
||||||
@author Dmitry.Cherepanov@SUN.COM area=awt.list
|
@library /test/lib
|
||||||
@run applet FirstItemRemoveTest.html
|
@build jdk.test.lib.Platform
|
||||||
|
@run main FirstItemRemoveTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import jdk.test.lib.Platform;
|
import jdk.test.lib.Platform;
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
public class FirstItemRemoveTest extends Applet
|
public class FirstItemRemoveTest extends Frame
|
||||||
{
|
{
|
||||||
List list = new List(4, false);
|
List list = new List(4, false);
|
||||||
Panel panel = new Panel();
|
Panel panel = new Panel();
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
FirstItemRemoveTest app = new FirstItemRemoveTest();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
list.add("000");
|
list.add("000");
|
||||||
@ -59,6 +66,8 @@ public class FirstItemRemoveTest extends Applet
|
|||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
setSize (200,200);
|
setSize (200,200);
|
||||||
|
setUndecorated(true);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
validate();
|
validate();
|
||||||
|
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6387275
|
|
||||||
@summary List: the focus is at the top of the first item, XAWT
|
|
||||||
@author Dmitry.Cherepanov@SUN.COM area=awt.list
|
|
||||||
@requires (os.family == "linux" | os.family == "solaris")
|
|
||||||
@modules java.desktop/sun.awt
|
|
||||||
java.desktop/java.awt.peer
|
|
||||||
java.desktop/sun.awt.X11:open
|
|
||||||
@run applet FocusEmptyListTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> FocusEmptyListTest </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>FocusEmptyListTest<br>Bug ID: 6387275 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="FocusEmptyListTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,25 +22,29 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6387275
|
@bug 6387275
|
||||||
@summary List: the focus is at the top of the first item, XAWT
|
@summary List: the focus is at the top of the first item, XAWT
|
||||||
@author Dmitry.Cherepanov@SUN.COM area=awt.list
|
@requires (os.family == "linux" | os.family == "solaris")
|
||||||
@run applet FocusEmptyListTest.html
|
@modules java.desktop/sun.awt
|
||||||
|
java.desktop/java.awt.peer
|
||||||
|
java.desktop/sun.awt.X11:open
|
||||||
|
@run main FocusEmptyListTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.awt.peer.ListPeer;
|
import java.awt.peer.ListPeer;
|
||||||
|
|
||||||
import sun.awt.AWTAccessor;
|
import sun.awt.AWTAccessor;
|
||||||
|
|
||||||
public class FocusEmptyListTest extends Applet {
|
public class FocusEmptyListTest extends Frame {
|
||||||
|
|
||||||
public void init() {
|
public static void main(final String[] args) {
|
||||||
setLayout(new BorderLayout());
|
FocusEmptyListTest app = new FocusEmptyListTest();
|
||||||
}//End init()
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
boolean isXToolkit = Toolkit.getDefaultToolkit()
|
boolean isXToolkit = Toolkit.getDefaultToolkit()
|
||||||
@ -61,6 +65,8 @@ public class FocusEmptyListTest extends Applet {
|
|||||||
list.add("item1");
|
list.add("item1");
|
||||||
|
|
||||||
setSize(200, 200);
|
setSize(200, 200);
|
||||||
|
setUndecorated(true);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
validate();
|
validate();
|
||||||
|
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6190768 6190778
|
|
||||||
@summary Tests that triggering events on AWT list by pressing CTRL + HOME, CTRL + END, PG-UP, PG-DOWN similar Motif behavior
|
|
||||||
@author Dmitry.Cherepanov@SUN.COM area=awt.list
|
|
||||||
@library /test/lib
|
|
||||||
@build jdk.test.lib.Platform
|
|
||||||
@run applet KeyEventsTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>KeyEventsTest<br>Bug ID: 6190768 6190778 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="KeyEventsTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -22,30 +22,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6190768 6190778
|
@bug 6190768 6190778
|
||||||
@summary Tests that triggering events on AWT list by pressing CTRL + HOME, CTRL + END, PG-UP, PG-DOWN similar Motif behavior
|
@summary Tests that triggering events on AWT list by pressing CTRL + HOME,
|
||||||
@author Dmitry.Cherepanov@SUN.COM area=awt.list
|
CTRL + END, PG-UP, PG-DOWN similar Motif behavior
|
||||||
@library /test/lib
|
@library /test/lib
|
||||||
@build jdk.test.lib.Platform
|
@build jdk.test.lib.Platform
|
||||||
@run applet KeyEventsTest.html
|
@run main KeyEventsTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* KeyEventsTest.html
|
|
||||||
*
|
|
||||||
* summary:
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.util.Set;
|
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
|
|
||||||
import jdk.test.lib.Platform;
|
import jdk.test.lib.Platform;
|
||||||
|
|
||||||
public class KeyEventsTest extends Applet implements ItemListener, FocusListener, KeyListener
|
public class KeyEventsTest extends Frame implements ItemListener, FocusListener, KeyListener
|
||||||
{
|
{
|
||||||
TestState currentState;
|
TestState currentState;
|
||||||
final Object LOCK = new Object();
|
final Object LOCK = new Object();
|
||||||
@ -57,6 +50,12 @@ public class KeyEventsTest extends Applet implements ItemListener, FocusListener
|
|||||||
Panel p1 = new Panel ();
|
Panel p1 = new Panel ();
|
||||||
Panel p2 = new Panel ();
|
Panel p2 = new Panel ();
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
KeyEventsTest app = new KeyEventsTest();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
setLayout (new BorderLayout ());
|
setLayout (new BorderLayout ());
|
||||||
@ -100,11 +99,13 @@ public class KeyEventsTest extends Applet implements ItemListener, FocusListener
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
setSize (200,200);
|
setSize (200,200);
|
||||||
setVisible(true);
|
|
||||||
validate();
|
validate();
|
||||||
|
setUndecorated(true);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
setVisible(true);
|
||||||
|
|
||||||
main(null);
|
doTest();
|
||||||
|
System.out.println("Test passed.");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException("The test failed.");
|
throw new RuntimeException("The test failed.");
|
||||||
@ -112,14 +113,6 @@ public class KeyEventsTest extends Applet implements ItemListener, FocusListener
|
|||||||
|
|
||||||
}// start()
|
}// start()
|
||||||
|
|
||||||
private void main(String[] args)
|
|
||||||
throws InterruptedException, InvocationTargetException {
|
|
||||||
|
|
||||||
doTest();
|
|
||||||
|
|
||||||
System.out.println("Test passed.");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void itemStateChanged (ItemEvent ie) {
|
public void itemStateChanged (ItemEvent ie) {
|
||||||
System.out.println("itemStateChanged-"+ie);
|
System.out.println("itemStateChanged-"+ie);
|
||||||
this.currentState.setAction(true);
|
this.currentState.setAction(true);
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5039416 6404008
|
|
||||||
@summary REGRESSION: Extra mouse click dispatched after press-drag- release sequence.
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@author andrei.dmitriev area=awt.event
|
|
||||||
@run applet ExtraMouseClick.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>ExtraMouseClick </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ExtraMouseClick<br>Bug ID: 5039416 </h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="ExtraMouseClick.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,18 +22,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
@bug 5039416 6404008 7087869
|
@key headful
|
||||||
|
@bug 5039416 6404008
|
||||||
@summary REGRESSION: Extra mouse click dispatched after press-drag- release sequence.
|
@summary REGRESSION: Extra mouse click dispatched after press-drag- release sequence.
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@author andrei.dmitriev area=awt.event
|
@run main ExtraMouseClick
|
||||||
@run applet ExtraMouseClick.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.AWTException;
|
import java.awt.AWTException;
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
@ -50,9 +48,7 @@ import test.java.awt.regtesthelpers.Util;
|
|||||||
// Note that this test may not fail easily. But it must always pass on
|
// Note that this test may not fail easily. But it must always pass on
|
||||||
// patched workspace.
|
// patched workspace.
|
||||||
//**
|
//**
|
||||||
|
public class ExtraMouseClick {
|
||||||
public class ExtraMouseClick extends Applet
|
|
||||||
{
|
|
||||||
Frame frame = new Frame("Extra Click After MouseDrag");
|
Frame frame = new Frame("Extra Click After MouseDrag");
|
||||||
final int TRIALS = 10;
|
final int TRIALS = 10;
|
||||||
final int SMUDGE_WIDTH = 4;
|
final int SMUDGE_WIDTH = 4;
|
||||||
@ -64,10 +60,14 @@ public class ExtraMouseClick extends Applet
|
|||||||
boolean pressed = false;
|
boolean pressed = false;
|
||||||
boolean released = false;
|
boolean released = false;
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
|
ExtraMouseClick app = new ExtraMouseClick();
|
||||||
|
app.init();
|
||||||
|
app.start();
|
||||||
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
{
|
{
|
||||||
this.setLayout (new BorderLayout ());
|
|
||||||
|
|
||||||
frame.addMouseListener(new MouseAdapter() {
|
frame.addMouseListener(new MouseAdapter() {
|
||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
System.out.println("MousePressed");
|
System.out.println("MousePressed");
|
||||||
@ -99,6 +99,7 @@ public class ExtraMouseClick extends Applet
|
|||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
frame.setSize(480, 300);
|
frame.setSize(480, 300);
|
||||||
|
frame.setLocationRelativeTo(null);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
try{
|
try{
|
||||||
robot = new Robot();
|
robot = new Robot();
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4664415
|
|
||||||
@summary Test that double clicking the titlebar does not send RELEASE/CLICKED
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@author bchristi: area=Mouse
|
|
||||||
@run applet TitleBarDoubleClick.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>TitleBarDoubleClick<br>Bug ID: 9999999 XXX_CHANGE_THIS </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="TitleBarDoubleClick.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,18 +22,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 4664415
|
@bug 4664415
|
||||||
@summary REGRESSION: double click jframe titlebar generating mouse events in panel
|
@summary Test that double clicking the titlebar does not send RELEASE/CLICKED
|
||||||
@author Andrei Dmitriev: area=awt.mouse
|
@library ../../regtesthelpers
|
||||||
@run applet TitleBarDoubleClick.html
|
@build Util
|
||||||
|
@run main TitleBarDoubleClick
|
||||||
*/
|
*/
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class TitleBarDoubleClick extends Applet implements MouseListener,
|
public class TitleBarDoubleClick implements MouseListener,
|
||||||
WindowListener
|
WindowListener
|
||||||
{
|
{
|
||||||
//Declare things used in the test, like buttons and labels here
|
//Declare things used in the test, like buttons and labels here
|
||||||
@ -43,24 +45,13 @@ public class TitleBarDoubleClick extends Applet implements MouseListener,
|
|||||||
Frame frame;
|
Frame frame;
|
||||||
Robot robot;
|
Robot robot;
|
||||||
|
|
||||||
public void init()
|
public static void main(final String[] args) {
|
||||||
{
|
TitleBarDoubleClick app = new TitleBarDoubleClick();
|
||||||
this.setLayout (new BorderLayout ());
|
app.start();
|
||||||
|
}
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start ()
|
public void start ()
|
||||||
{
|
{
|
||||||
//Get things going. Request focus, set size, et cetera
|
|
||||||
setSize (200,200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
//What would normally go into main() will probably go here.
|
|
||||||
//Use System.out.println for diagnostic messages that you want
|
|
||||||
//to read after the test is done.
|
|
||||||
//Use Sysout.println for messages you want the tester to read.
|
|
||||||
|
|
||||||
robot = Util.createRobot();
|
robot = Util.createRobot();
|
||||||
robot.setAutoDelay(100);
|
robot.setAutoDelay(100);
|
||||||
robot.mouseMove(BOUNDS.x + (BOUNDS.width / 2),
|
robot.mouseMove(BOUNDS.x + (BOUNDS.width / 2),
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 4868278
|
|
||||||
@summary Tests that GraphicsConfig for invisible (peerless) windows is
|
|
||||||
updated after showing the window
|
|
||||||
@author artem.ananiev, area=awt.multiscreen
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@build Util
|
|
||||||
@run applet WindowGCChangeTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> WindowGCChangeTest </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>WindowGCChangeTest<br>Bug ID: 4868278 Problem with Action button tooltips with some multiple monitor configurations </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="WindowGCChangeTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,31 +22,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 4868278
|
@bug 4868278
|
||||||
@summary Tests that GraphicsConfig for invisible (peerless) window is
|
@summary Tests that GraphicsConfig for invisible (peerless) windows is
|
||||||
updated after showing the window
|
updated after showing the window
|
||||||
@author artem.ananiev, area=awt.multiscreen
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@build Util
|
@build Util
|
||||||
@run applet WindowGCChangeTest.html
|
@run main WindowGCChangeTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
|
||||||
public class WindowGCChangeTest extends Applet
|
public class WindowGCChangeTest {
|
||||||
{
|
|
||||||
public void init()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start()
|
public static void main(final String[] args) {
|
||||||
{
|
|
||||||
Robot robot = null;
|
Robot robot = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -57,10 +50,6 @@ public class WindowGCChangeTest extends Applet
|
|||||||
z.printStackTrace(System.err);
|
z.printStackTrace(System.err);
|
||||||
throw new RuntimeException("Test FAILED: couldn't create Robot instance", z);
|
throw new RuntimeException("Test FAILED: couldn't create Robot instance", z);
|
||||||
}
|
}
|
||||||
|
|
||||||
setSize(200, 200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
Util.waitForIdle(robot);
|
Util.waitForIdle(robot);
|
||||||
|
|
||||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6260648
|
|
||||||
@summary Tests that WINDOW_DESTROY event can be handled by overriding handleEvent(). Also,
|
|
||||||
tests that handleEvent() is not called by AWT if any listener is added to the component
|
|
||||||
(i. e. when post-1.1 events schema is used)
|
|
||||||
@author artem.ananiev: area=awt.event
|
|
||||||
@run applet HandleWindowDestroyTest.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>HandleWindowDestroyTest<br>Bug ID: 6260648</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="HandleWindowDestroyTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -24,30 +24,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6260648
|
@bug 6260648
|
||||||
@summary Tests that WINDOW_DESTROY event can be handled by overriding handleEvent(). Also,
|
@summary Tests that WINDOW_DESTROY event can be handled by overriding handleEvent(). Also,
|
||||||
tests that handleEvent() is not called by AWT if any listener is added to the component
|
tests that handleEvent() is not called by AWT if any listener is added to the component
|
||||||
(i. e. when post-1.1 events schema is used)
|
(i. e. when post-1.1 events schema is used)
|
||||||
@author artem.ananiev: area=awt.event
|
@run main HandleWindowDestroyTest
|
||||||
@run applet HandleWindowDestroyTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.applet.*;
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
|
|
||||||
public class HandleWindowDestroyTest extends Applet
|
public class HandleWindowDestroyTest {
|
||||||
{
|
|
||||||
private volatile boolean handleEventCalled;
|
|
||||||
|
|
||||||
public void start ()
|
private static volatile boolean handleEventCalled;
|
||||||
{
|
|
||||||
setSize (200,200);
|
|
||||||
setVisible(true);
|
|
||||||
validate();
|
|
||||||
|
|
||||||
|
public static void main(final String[] args) {
|
||||||
Robot robot;
|
Robot robot;
|
||||||
try {
|
try {
|
||||||
robot = new Robot();
|
robot = new Robot();
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5098433
|
|
||||||
@summary REG: DnD of File-List between JVM is broken for non ASCII file names - Win32
|
|
||||||
@author Denis Fokin: area=dnd
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@library ../../regtesthelpers/process
|
|
||||||
@build Util
|
|
||||||
@build ProcessResults ProcessCommunicator
|
|
||||||
@run applet/othervm DragUnicodeBetweenJVMTest.html
|
|
||||||
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> REG: DnD of File-List between JVM is broken for non ASCII file names - Win32</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1> DragUnicodeBetweenJVMTest <br>Bug ID: 5098433 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="DragUnicodeBetweenJVMTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,43 +22,26 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 5098433
|
@bug 5098433
|
||||||
@summary REG: DnD of File-List between JVM is broken for non ASCII file names - Win32
|
@summary REG: DnD of File-List between JVM is broken for non ASCII file names - Win32
|
||||||
@author Denis Fokin: area=dnd
|
|
||||||
@library ../../regtesthelpers
|
@library ../../regtesthelpers
|
||||||
@library ../../regtesthelpers/process
|
@library ../../regtesthelpers/process
|
||||||
@build Util
|
@build Util
|
||||||
@build ProcessResults ProcessCommunicator
|
@build ProcessResults ProcessCommunicator
|
||||||
|
@run main/othervm DragUnicodeBetweenJVMTest main
|
||||||
|
|
||||||
@run applet/othervm DragUnicodeBetweenJVMTest.html
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* DragUnicodeBetweenJVMTest.java
|
|
||||||
*
|
|
||||||
* summary: The test drags a list of files (DataFlavor.javaFileListFlavor) from one jvm to another.
|
|
||||||
* The files have Unicode names. The list on target side must be equal to
|
|
||||||
* the list on the source side.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
|
|
||||||
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
|
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
|
||||||
import test.java.awt.regtesthelpers.process.ProcessResults;
|
import test.java.awt.regtesthelpers.process.ProcessResults;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
public class DragUnicodeBetweenJVMTest extends Applet
|
public class DragUnicodeBetweenJVMTest {
|
||||||
{
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
setLayout(new BorderLayout());
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
|
||||||
@ -176,7 +159,11 @@ public class DragUnicodeBetweenJVMTest extends Applet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String [] args) {
|
public static void main(final String [] args) {
|
||||||
|
if (args.length > 0 && args[0].equals("main")) {
|
||||||
|
new DragUnicodeBetweenJVMTest().start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
|
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
|
||||||
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
|
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
|
||||||
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
|
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
|
||||||
@ -188,6 +175,4 @@ public class DragUnicodeBetweenJVMTest extends Applet
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 8005932 8017456
|
|
||||||
@summary Java 7 on mac os x only provides text clipboard formats
|
|
||||||
@author mikhail.cherkasov@oracle.com
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@library ../../regtesthelpers/process
|
|
||||||
@library /test/lib
|
|
||||||
@build Util
|
|
||||||
@build ProcessResults ProcessCommunicator
|
|
||||||
@build jdk.test.lib.Platform
|
|
||||||
@run applet/othervm MissedHtmlAndRtfBug.html
|
|
||||||
-->
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>Java 7 on mac os x only provides text clipboard formats</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1> MissedHtmlAndRtfBug <br>Bug ID: 8005932 </h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="MissedHtmlAndRtfBug.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -24,7 +24,6 @@
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.datatransfer.DataFlavor;
|
import java.awt.datatransfer.DataFlavor;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -35,11 +34,20 @@ import test.java.awt.regtesthelpers.Util;
|
|||||||
|
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
public class MissedHtmlAndRtfBug extends Applet {
|
/*
|
||||||
|
@test
|
||||||
public void init() {
|
@key headful
|
||||||
setLayout(new BorderLayout());
|
@bug 8005932 8017456
|
||||||
}//End init()
|
@summary Java 7 on mac os x only provides text clipboard formats
|
||||||
|
@library ../../regtesthelpers
|
||||||
|
@library ../../regtesthelpers/process
|
||||||
|
@library /test/lib
|
||||||
|
@build Util
|
||||||
|
@build ProcessResults ProcessCommunicator
|
||||||
|
@build jdk.test.lib.Platform
|
||||||
|
@run main/othervm MissedHtmlAndRtfBug main
|
||||||
|
*/
|
||||||
|
public class MissedHtmlAndRtfBug {
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
if (!Platform.isOSX() && !Platform.isWindows()) {
|
if (!Platform.isOSX() && !Platform.isWindows()) {
|
||||||
@ -178,6 +186,11 @@ public class MissedHtmlAndRtfBug extends Applet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
|
if (args.length > 0 && args[0].equals("main")) {
|
||||||
|
new MissedHtmlAndRtfBug().start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extractInt(args),
|
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extractInt(args),
|
||||||
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extractInt(args));
|
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extractInt(args));
|
||||||
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extractInt(args),
|
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extractInt(args),
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 6887703
|
|
||||||
@summary Unsigned applet can retrieve the dragged information before drop action occurs
|
|
||||||
@author : area=dnd
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@library ../../regtesthelpers/process
|
|
||||||
@build Util
|
|
||||||
@build ProcessResults ProcessCommunicator
|
|
||||||
@run applet/othervm DragInterceptorAppletTest.html
|
|
||||||
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> Unsigned applet can retrieve the dragged information before drop action occurs </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>DragInterceptorAppletTest<br>Bug ID: 6887703</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="DragInterceptorAppletTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,33 +22,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 6887703
|
@bug 6887703
|
||||||
@summary Unsigned applet can retrieve the dragged information before drop action occurs
|
@summary Unsigned applet can retrieve the dragged information before drop action occurs
|
||||||
@author : area=dnd
|
@library ../../regtesthelpers
|
||||||
@run applet DragInterceptorAppletTest.html
|
@library ../../regtesthelpers/process
|
||||||
|
@build Util
|
||||||
|
@build ProcessResults ProcessCommunicator
|
||||||
|
@run main/othervm DragInterceptorAppletTest main
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
import java.awt.Point;
|
||||||
* DragInterceptorAppletTest.java
|
import java.awt.Robot;
|
||||||
*
|
import java.awt.event.InputEvent;
|
||||||
* summary: Unsigned applet can retrieve the dragged information before drop action occurs
|
|
||||||
*/
|
import test.java.awt.regtesthelpers.Util;
|
||||||
|
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
|
||||||
|
import test.java.awt.regtesthelpers.process.ProcessResults;
|
||||||
|
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
|
public class DragInterceptorAppletTest {
|
||||||
import test.java.awt.regtesthelpers.process.ProcessResults;
|
|
||||||
import test.java.awt.regtesthelpers.Util;
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.event.InputEvent;
|
|
||||||
|
|
||||||
public class DragInterceptorAppletTest extends Applet {
|
|
||||||
|
|
||||||
public void init() {
|
|
||||||
setLayout(new BorderLayout());
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
|
||||||
@ -138,7 +133,11 @@ public class DragInterceptorAppletTest extends Applet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String [] args) {
|
public static void main(final String[] args) {
|
||||||
|
if (args.length > 0 && args[0].equals("main")) {
|
||||||
|
new DragInterceptorAppletTest().start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
|
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
|
||||||
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
|
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
|
||||||
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
|
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test
|
|
||||||
@key headful
|
|
||||||
@bug 5079469
|
|
||||||
@summary DnD of File-List across JVM adds two empty items to the list
|
|
||||||
@author : area=dnd
|
|
||||||
@library ../../regtesthelpers
|
|
||||||
@library ../../regtesthelpers/process
|
|
||||||
@build Util
|
|
||||||
@build ProcessResults ProcessCommunicator
|
|
||||||
@run applet/othervm FileListBetweenJVMsTest.html
|
|
||||||
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> DnD of File-List across JVM </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>FileListBetweenJVMsTest<br>Bug ID: 5079469</h1>
|
|
||||||
|
|
||||||
<p> This is an AUTOMATIC test, simply wait for completion </p>
|
|
||||||
|
|
||||||
<APPLET CODE="FileListBetweenJVMsTest.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -22,39 +22,30 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
test
|
@test
|
||||||
|
@key headful
|
||||||
@bug 5079469
|
@bug 5079469
|
||||||
@summary DnD of File-List across JVM adds two empty items to the list
|
@summary DnD of File-List across JVM adds two empty items to the list
|
||||||
@author : area=dnd
|
@library ../../regtesthelpers
|
||||||
@run applet FileListBetweenJVMsTest.html
|
@library ../../regtesthelpers/process
|
||||||
|
@build Util
|
||||||
|
@build ProcessResults ProcessCommunicator
|
||||||
|
@run main/othervm FileListBetweenJVMsTest main
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* FileListBetweenJVMsTest.java
|
|
||||||
*
|
|
||||||
* summary: DnD of File-List across JVM adds two empty items to the list
|
|
||||||
*/
|
|
||||||
|
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
|
import test.java.awt.regtesthelpers.process.ProcessCommunicator;
|
||||||
import test.java.awt.regtesthelpers.process.ProcessResults;
|
import test.java.awt.regtesthelpers.process.ProcessResults;
|
||||||
import test.java.awt.regtesthelpers.Util;
|
import test.java.awt.regtesthelpers.Util;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.InputEvent;
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
public class FileListBetweenJVMsTest extends Applet {
|
public class FileListBetweenJVMsTest {
|
||||||
|
|
||||||
// information related to the test in common
|
// information related to the test in common
|
||||||
static int VISIBLE_RAWS_IN_LIST=15;
|
static int VISIBLE_RAWS_IN_LIST=15;
|
||||||
|
|
||||||
public void init() {
|
|
||||||
setLayout(new BorderLayout());
|
|
||||||
|
|
||||||
}//End init()
|
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
|
||||||
SourceFileListFrame sourceFrame = new SourceFileListFrame();
|
SourceFileListFrame sourceFrame = new SourceFileListFrame();
|
||||||
@ -130,7 +121,11 @@ public class FileListBetweenJVMsTest extends Applet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main (String [] args) {
|
public static void main(final String [] args) {
|
||||||
|
if (args.length > 0 && args[0].equals("main")) {
|
||||||
|
new FileListBetweenJVMsTest().start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
|
Point dragSourcePoint = new Point(InterprocessArguments.DRAG_SOURCE_POINT_X_ARGUMENT.extract(args),
|
||||||
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
|
InterprocessArguments.DRAG_SOURCE_POINT_Y_ARGUMENT.extract(args));
|
||||||
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
|
Point targetFrameLocation = new Point(InterprocessArguments.TARGET_FRAME_X_POSITION_ARGUMENT.extract(args),
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
|
|
||||||
This code is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License version 2 only, as
|
|
||||||
published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
accompanied this code).
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License version
|
|
||||||
2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
or visit www.oracle.com if you need additional information or have any
|
|
||||||
questions.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<!--
|
|
||||||
@test %W% %E%
|
|
||||||
@key headful
|
|
||||||
@bug 4874070
|
|
||||||
@summary Tests basic DnD functionality
|
|
||||||
@author Your Name: Alexey Utkin area=dnd
|
|
||||||
@run applet ImageDecoratedDnDInOut.html
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title> ImageDecoratedDnDInOut </title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>ImageDecoratedDnDInOut<br>Bug ID: 4874070</h1>
|
|
||||||
|
|
||||||
<p> See the dialog box (usually in upper left corner) for instructions</p>
|
|
||||||
|
|
||||||
<APPLET CODE="ImageDecoratedDnDInOut.class" WIDTH=200 HEIGHT=200></APPLET>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user