8204946: Clean-up problem list for JDK-8202933 and JDK-8202934
authorsveerabhadra
Fri, 22 Jun 2018 10:29:14 +0530
changeset 50829 074148730b4e
parent 50828 1ab8e3b0cee2
child 50830 5500595d8ebf
8204946: Clean-up problem list for JDK-8202933 and JDK-8202934 Reviewed-by: prr
test/jdk/ProblemList.txt
test/jdk/java/awt/grab/MenuDragEvents/MenuDragEvents.html
test/jdk/java/awt/grab/MenuDragEvents/MenuDragEvents.java
--- a/test/jdk/ProblemList.txt	Thu Jun 21 16:58:09 2018 -0700
+++ b/test/jdk/ProblemList.txt	Fri Jun 22 10:29:14 2018 +0530
@@ -485,8 +485,6 @@
 java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.html 7124275 macosx-all
 java/awt/Focus/TranserFocusToWindow/TranserFocusToWindow.java 6848810 macosx-all
 java/awt/Component/NativeInLightShow/NativeInLightShow.java 8202932 linux-all
-java/awt/grab/GrabOnUnfocusableToplevel/GrabOnUnfocusableToplevel.java 8202933 linux-all
-java/awt/grab/MenuDragEvents/MenuDragEvents.html 8202934 linux-all
 java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java 8194751 linux-all
 java/awt/image/VolatileImage/BitmaskVolatileImage.java 8133102 linux-all
 java/awt/SplashScreen/MultiResolutionSplash/unix/UnixMultiResolutionSplashTest.java 8203004 linux-all
--- a/test/jdk/java/awt/grab/MenuDragEvents/MenuDragEvents.html	Thu Jun 21 16:58:09 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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 6390326
-  @summary REGRESSION: Broken mouse behaviour of menus partially outside the main window.
-  @author oleg.sukhodolsky: area=awt-drab
-  @run applet MenuDragEvents.html
-  -->
-<head>
-<title>  </title>
-</head>
-<body>
-
-<h1>MenuDragEvents<br>Bug ID: 6390326 </h1>
-
-<p> This is an AUTOMATIC test, simply wait for completion </p>
-
-<APPLET CODE="MenuDragEvents.class" WIDTH=200 HEIGHT=200></APPLET>
-</body>
-</html>
-
--- a/test/jdk/java/awt/grab/MenuDragEvents/MenuDragEvents.java	Thu Jun 21 16:58:09 2018 -0700
+++ b/test/jdk/java/awt/grab/MenuDragEvents/MenuDragEvents.java	Fri Jun 22 10:29:14 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2014, 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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,20 +21,13 @@
  * questions.
  */
 /*
-  test
-  @bug 6390326
+  @test
+  @bug 6390326 8204946
+  @key headful
   @summary REGRESSION: Broken mouse behaviour of menus partially outside the main window.
-  @author oleg.sukhodolsky: area=awt-drab
-  @run applet AutomaticAppletTest.html
+  @run main MenuDragEvents
 */
 
-/**
- * MenuDragEvents.java
- *
- * summary: REGRESSION: Broken mouse behaviour of menus partially outside the main window.
- */
-
-import java.applet.Applet;
 import java.awt.AWTEvent;
 import java.awt.AWTException;
 import java.awt.BorderLayout;
@@ -58,7 +51,7 @@
 import javax.swing.event.MenuDragMouseEvent;
 import javax.swing.event.MenuDragMouseListener;
 
-public class MenuDragEvents extends Applet
+public class MenuDragEvents
 {
     //Declare things used in the test, like buttons and labels here
     boolean mouseDragged = false;
@@ -66,22 +59,13 @@
     boolean mouseReleased = false;
     boolean actionReceived = false;
 
-    public void init()
-    {
-        // Set up the environment -- set the layout manager, add
-        // buttons, etc.
-
-        setLayout (new BorderLayout ());
+    public static void main(String[] args) {
+        MenuDragEvents test = new MenuDragEvents();
+        test.doTest();
+    }
 
-    }//End  init()
-
-    public void start ()
+    public void doTest ()
     {
-        //Get things going.  Request focus, set size, et cetera
-        setSize (200,200);
-        setVisible(true);
-        validate();
-
         Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
                 public void eventDispatched(AWTEvent event) {
                     int id = event.getID();
@@ -130,6 +114,7 @@
             });
 
         JFrame frame = new JFrame("Menu");
+        frame.setLayout (new BorderLayout ());
         frame.setJMenuBar(mb);
         frame.setSize(200, 200);
         frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
@@ -172,7 +157,10 @@
         }
 
         System.out.println("Test passed");
-    }// start()
+
+        // dispose off the frame
+        frame.dispose();
+    }// doTest()
 
     void dragMouse(Robot r, Point from, Point to) {
         final int n_step = 10;