changeset 12459:6c39ec510816

8131673: [TEST_BUG] add @modules to some OS X-specific regtests Reviewed-by: serb, azvegint
author yan
date Fri, 17 Jul 2015 11:45:34 +0300
parents 7f6ac78c4644
children dfd10083103a
files test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java	Wed Jul 15 10:00:15 2015 -0700
+++ b/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java	Fri Jul 17 11:45:34 2015 +0300
@@ -27,6 +27,7 @@
  * @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
  * @author leonid.romanov@oracle.com
  * @modules java.desktop/sun.awt
+ *          java.desktop/com.apple.eawt
  * @run main DefaultMenuBarTest
  */
 
--- a/test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java	Wed Jul 15 10:00:15 2015 -0700
+++ b/test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java	Fri Jul 17 11:45:34 2015 +0300
@@ -39,6 +39,7 @@
  *    The core reason of the issue was the lack of a mouse entered event in fullscreen
  * @library ../../regtesthelpers
  * @build Util
+ * @modules java.desktop/com.apple.eawt
  * @author Petr Pchelko area=awt.event
  * @run main FullscreenEnterEventTest
  */
@@ -62,6 +63,7 @@
 
         //Move the mouse out, because it could interfere with the test.
         Robot r = Util.createRobot();
+        r.setAutoDelay(50);
         Util.waitForIdle(r);
         r.mouseMove(0, 0);
         Util.waitForIdle(r);
@@ -85,6 +87,7 @@
             }
         });
         Util.waitForIdle(r);
+        r.delay(150);
         if (mouseEnterCount != 1) {
             throw new RuntimeException("No MouseEntered event for view-base full screen. Failed.");
         }
@@ -100,6 +103,7 @@
         Point fullScreenButtonPos = frame.getLocation();
         fullScreenButtonPos.translate(frame.getWidth() - 10, 10);
         r.mouseMove(fullScreenButtonPos.x, fullScreenButtonPos.y);
+        r.delay(150);
         mouseEnterCount = 0;
 
         //Cant use waitForIdle for full screen transition.
@@ -118,7 +122,7 @@
         }
 
         if (mouseEnterCount != 1) {
-            throw new RuntimeException("No MouseEntered event for native full screen. Failed.");
+            throw new RuntimeException("No MouseEntered event for native full screen. Failed. mouseEnterCount:"+mouseEnterCount);
         }
     }
 
--- a/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java	Wed Jul 15 10:00:15 2015 -0700
+++ b/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java	Fri Jul 17 11:45:34 2015 +0300
@@ -39,6 +39,7 @@
  * @library ../
  * @library ../../../../lib/testlibrary
  * @modules java.desktop/sun.awt
+ *          java.desktop/com.apple.eawt
  * @build jdk.testlibrary.OSInfo
  * @build GenerateTestImage
  * @run main GenerateTestImage
@@ -61,6 +62,7 @@
         try {
             //Move the mouse out, because it could interfere with the test.
             Robot r = new Robot();
+            r.setAutoDelay(50);
             r.mouseMove(0, 0);
             sleep();