--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Tue Dec 01 19:02:50 2015 +0300
@@ -413,6 +413,7 @@
void addListeners() {
canvas.addMouseListener(eventProxy);
canvas.addMouseMotionListener(eventProxy);
+ eframe.addMouseListener(eventProxy);
}
long getWindow() {
--- a/jdk/test/java/awt/TrayIcon/ActionCommand/ActionCommand.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/ActionCommand/ActionCommand.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -59,8 +59,11 @@
"and rerun test.");
} else if (System.getProperty("os.name").toLowerCase().startsWith("mac")){
isMacOS = true;
+ } else if (SystemTrayIconHelper.isOel7()) {
+ System.out.println("OEL 7 doesn't support double click in " +
+ "systray. Skipped");
+ return;
}
-
new ActionCommand().doTest();
}
}
--- a/jdk/test/java/awt/TrayIcon/ActionEventMask/ActionEventMask.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/ActionEventMask/ActionEventMask.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -66,6 +66,10 @@
} else {
if (System.getProperty("os.name").toLowerCase().startsWith("mac")) {
isMacOS = true;
+ } else if (SystemTrayIconHelper.isOel7()) {
+ System.out.println("OEL 7 doesn't support double click in " +
+ "systray. Skipped");
+ return;
}
new ActionEventMask().doTest();
}
--- a/jdk/test/java/awt/TrayIcon/ModalityTest/ModalityTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/ModalityTest/ModalityTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -35,6 +35,7 @@
*/
public class ModalityTest {
+ private static boolean isOEL7;
TrayIcon icon;
ExtendedRobot robot;
Dialog d;
@@ -80,7 +81,7 @@
"\"Always show all icons and notifications on the taskbar\" true " +
"to avoid this problem. Or change behavior only for Java SE tray " +
"icon and rerun test.");
-
+ isOEL7 = SystemTrayIconHelper.isOel7();
new ModalityTest().doTest();
}
}
@@ -225,6 +226,12 @@
Point iconPosition = SystemTrayIconHelper.getTrayIconLocation(icon);
if (iconPosition == null)
throw new RuntimeException("Unable to find the icon location!");
+ if (isOEL7) {
+ // close tray
+ robot.mouseMove(100,100);
+ robot.click(InputEvent.BUTTON1_MASK);
+ robot.waitForIdle(2000);
+ }
if (! d.isVisible())
throw new RuntimeException("FAIL: The modal dialog is not yet visible");
@@ -232,27 +239,35 @@
robot.mouseMove(iconPosition.x, iconPosition.y);
robot.waitForIdle(2000);
- SystemTrayIconHelper.doubleClick(robot);
+ if(!isOEL7) {
+ SystemTrayIconHelper.doubleClick(robot);
- if (! actionPerformed) {
- synchronized (actionLock) {
- try {
- actionLock.wait(3000);
- } catch (Exception e) {
+ if (!actionPerformed) {
+ synchronized (actionLock) {
+ try {
+ actionLock.wait(3000);
+ } catch (Exception e) {
+ }
}
}
+ if (!actionPerformed)
+ throw new RuntimeException("FAIL: ActionEvent not triggered when TrayIcon is double clicked");
}
- if (! actionPerformed)
- throw new RuntimeException("FAIL: ActionEvent not triggered when TrayIcon is double clicked");
for (int i = 0; i < buttonTypes.length; i++) {
mousePressed = false;
- robot.mousePress(buttonTypes[i]);
+ if(isOEL7) {
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.click(buttonTypes[i]);
+ } else {
+ robot.mousePress(buttonTypes[i]);
+ }
if (! mousePressed) {
synchronized (pressLock) {
try {
- pressLock.wait(3000);
+ pressLock.wait(6000);
} catch (Exception e) {
}
}
@@ -264,12 +279,18 @@
mouseReleased = false;
mouseClicked = false;
- robot.mouseRelease(buttonTypes[i]);
+ if(isOEL7) {
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.click(buttonTypes[i]);
+ } else {
+ robot.mouseRelease(buttonTypes[i]);
+ }
if (! mouseReleased) {
synchronized (releaseLock) {
try {
- releaseLock.wait(3000);
+ releaseLock.wait(6000);
} catch (Exception e) {
}
}
@@ -281,7 +302,7 @@
if (! mouseClicked) {
synchronized (clickLock) {
try {
- clickLock.wait(3000);
+ clickLock.wait(6000);
} catch (Exception e) {
}
}
@@ -290,13 +311,14 @@
throw new RuntimeException("FAIL: mouseClicked not triggered when " +
buttonNames[i] + " pressed & released");
}
+ if (!isOEL7) {
+ mouseMoved = false;
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.glide(iconPosition.x + 100, iconPosition.y);
- mouseMoved = false;
- robot.mouseMove(iconPosition.x, iconPosition.y);
- robot.glide(iconPosition.x + 100, iconPosition.y);
-
- if (! mouseMoved)
- if (! SystemTrayIconHelper.skip(0) )
- throw new RuntimeException("FAIL: mouseMoved not triggered even when mouse moved over the icon");
+ if (!mouseMoved)
+ if (!SystemTrayIconHelper.skip(0))
+ throw new RuntimeException("FAIL: mouseMoved not triggered even when mouse moved over the icon");
+ }
}
}
--- a/jdk/test/java/awt/TrayIcon/MouseEventMask/MouseEventMaskTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/MouseEventMask/MouseEventMaskTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -71,6 +71,8 @@
"\"Always show all icons and notifications on the taskbar\" true " +
"to avoid this problem. Or change behavior only for Java SE tray " +
"icon and rerun test.");
+ } else if (SystemTrayIconHelper.isOel7()) {
+ return;
}
new MouseEventMaskTest().doTest();
}
--- a/jdk/test/java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/MouseMovedTest/MouseMovedTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -31,7 +31,7 @@
* @summary Check for mouseMoved event for java.awt.TrayIcon
* @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
* @library ../../../../lib/testlibrary
- * @build ExtendedRobot
+ * @build ExtendedRobot SystemTrayIconHelper
* @run main MouseMovedTest
*/
@@ -39,6 +39,14 @@
static volatile boolean moved;
public static void main(String[] args) throws Exception {
+ if (!SystemTray.isSupported()) {
+ return;
+ }
+
+ if (SystemTrayIconHelper.isOel7()) {
+ return;
+ }
+
moved = false;
TrayIcon icon = new TrayIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB), "Test icon");
--- a/jdk/test/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/FunctionalityCheck.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/FunctionalityCheck.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -51,6 +51,7 @@
boolean mouseReleased = false;
boolean mouseClicked = false;
boolean mouseMoved = false;
+ static boolean isOEL7;
static final int[] buttonTypes = {
InputEvent.BUTTON1_MASK,
@@ -69,6 +70,7 @@
System.out.println("SystemTray not supported on the platform under test. " +
"Marking the test passed");
} else {
+ isOEL7 = SystemTrayIconHelper.isOel7();
new FunctionalityCheck().doTest();
}
}
@@ -188,31 +190,44 @@
Point iconPosition = SystemTrayIconHelper.getTrayIconLocation(icon);
if (iconPosition == null)
throw new RuntimeException("Unable to find the icon location!");
+ if (isOEL7) {
+ // close tray
+ robot.mouseMove(100,100);
+ robot.click(InputEvent.BUTTON1_MASK);
+ robot.waitForIdle(2000);
+ }
robot.mouseMove(iconPosition.x, iconPosition.y);
- robot.waitForIdle(2000);
-
- SystemTrayIconHelper.doubleClick(robot);
+ robot.waitForIdle();
+ if(!isOEL7) {
+ SystemTrayIconHelper.doubleClick(robot);
- if (! actionPerformed) {
- synchronized (actionLock) {
- try {
- actionLock.wait(3000);
- } catch (Exception e) {
+ if (!actionPerformed) {
+ synchronized (actionLock) {
+ try {
+ actionLock.wait(3000);
+ } catch (Exception e) {
+ }
}
}
+ if (!actionPerformed)
+ throw new RuntimeException("FAIL: ActionEvent not triggered when TrayIcon is double clicked");
}
- if (! actionPerformed)
- throw new RuntimeException("FAIL: ActionEvent not triggered when TrayIcon is double clicked");
for (int i = 0; i < buttonTypes.length; i++) {
mousePressed = false;
- robot.mousePress(buttonTypes[i]);
+ if(isOEL7) {
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.click(buttonTypes[i]);
+ } else {
+ robot.mousePress(buttonTypes[i]);
+ }
if (! mousePressed) {
synchronized (pressLock) {
try {
- pressLock.wait(3000);
+ pressLock.wait(6000);
} catch (Exception e) {
}
}
@@ -224,12 +239,17 @@
mouseReleased = false;
mouseClicked = false;
- robot.mouseRelease(buttonTypes[i]);
-
+ if(isOEL7) {
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.click(buttonTypes[i]);
+ } else {
+ robot.mouseRelease(buttonTypes[i]);
+ }
if (! mouseReleased) {
synchronized (releaseLock) {
try {
- releaseLock.wait(3000);
+ releaseLock.wait(6000);
} catch (Exception e) {
}
}
@@ -242,7 +262,7 @@
if (! mouseClicked) {
synchronized (clickLock) {
try {
- clickLock.wait(3000);
+ clickLock.wait(6000);
} catch (Exception e) {
}
}
@@ -251,13 +271,14 @@
throw new RuntimeException("FAIL: mouseClicked not triggered when " +
buttonNames[i] + " pressed & released");
}
+ if(!isOEL7) {
+ mouseMoved = false;
+ robot.mouseMove(iconPosition.x + 100, iconPosition.y);
+ robot.glide(iconPosition.x, iconPosition.y);
- mouseMoved = false;
- robot.mouseMove(iconPosition.x + 100, iconPosition.y);
- robot.glide(iconPosition.x, iconPosition.y);
-
- if (! mouseMoved)
- if (! SystemTrayIconHelper.skip(0) )
- throw new RuntimeException("FAIL: mouseMoved not triggered even when mouse moved over the icon");
+ if (!mouseMoved)
+ if (!SystemTrayIconHelper.skip(0))
+ throw new RuntimeException("FAIL: mouseMoved not triggered even when mouse moved over the icon");
+ }
}
}
--- a/jdk/test/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/tray.policy Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/tray.policy Tue Dec 01 19:02:50 2015 +0300
@@ -5,6 +5,7 @@
permission java.util.PropertyPermission "resultsDir", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
permission java.awt.AWTPermission "accessEventQueue";
permission java.lang.RuntimePermission "setIO";
permission java.lang.RuntimePermission "accessDeclaredMembers";
@@ -17,5 +18,6 @@
permission java.util.PropertyPermission "java.class.path", "read";
permission java.awt.AWTPermission "readDisplayPixels";
permission java.awt.AWTPermission "watchMousePointer";
+
};
--- a/jdk/test/java/awt/TrayIcon/SystemTrayIconHelper.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/SystemTrayIconHelper.java Tue Dec 01 19:02:50 2015 +0300
@@ -66,7 +66,9 @@
for (int x = (int) (screenSize.getWidth()-width); x > 0; x--) {
for (int y = (int) (screenSize.getHeight()-height); y > (screenSize.getHeight()-50); y--) {
if (imagesEquals(((BufferedImage)icon.getImage()).getSubimage(0, 0, width, height), screen.getSubimage(x, y, width, height))) {
- return new Point(x+5, y+5);
+ Point point = new Point(x + 5, y + 5);
+ System.out.println("Icon location " + point);
+ return point;
}
}
}
@@ -91,6 +93,7 @@
point2d = (Point2D)m_getLocation.invoke(peer, new Object[]{model});
Point po = new Point((int)(point2d.getX()), (int)(point2d.getY()));
po.translate(10, -5);
+ System.out.println("Icon location " + po);
return po;
}catch(Exception e) {
e.printStackTrace();
@@ -101,12 +104,15 @@
// sun.awt.X11.XTrayIconPeer
Field f_peer = getField(java.awt.TrayIcon.class, "peer");
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+
Object peer = f_peer.get(icon);
Method m_getLOS = peer.getClass().getDeclaredMethod(
"getLocationOnScreen", new Class[]{});
m_getLOS.setAccessible(true);
Point point = (Point)m_getLOS.invoke(peer, new Object[]{});
point.translate(5, 5);
+ System.out.println("Icon location " + point);
return point;
} catch (Exception e) {
e.printStackTrace();
@@ -169,4 +175,38 @@
}
return false;
}
+
+ public static boolean openTrayIfNeeded(Robot robot) {
+ String sysv = System.getProperty("os.version");
+ System.out.println("System version is " + sysv);
+ //Additional step to raise the system try in Gnome 3 in OEL 7
+ if(isOel7()) {
+ System.out.println("OEL 7 detected");
+ GraphicsConfiguration gc = GraphicsEnvironment.
+ getLocalGraphicsEnvironment().getDefaultScreenDevice().
+ getDefaultConfiguration();
+ Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+ if(insets.bottom > 0) {
+ Dimension screenSize = Toolkit.getDefaultToolkit()
+ .getScreenSize();
+ robot.mouseMove(screenSize.width - insets.bottom / 2,
+ screenSize.height - insets.bottom / 2);
+ robot.delay(50);
+ robot.mousePress(InputEvent.BUTTON1_MASK);
+ robot.delay(50);
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
+ robot.waitForIdle();
+ robot.delay(1000);
+ System.out.println("Tray is opened");
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isOel7() {
+ return System.getProperty("os.name").toLowerCase()
+ .contains("linux") && System.getProperty("os.version")
+ .toLowerCase().contains("el7");
+ }
}
--- a/jdk/test/java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -121,6 +121,12 @@
};
}
+ if (SystemTrayIconHelper.isOel7()) {
+ System.out.println("OEL 7 doesn't support click modifiers in " +
+ "systray. Skipped");
+ return;
+ }
+
new TrayIconEventModifiersTest().doTest();
}
}
--- a/jdk/test/java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -37,6 +37,7 @@
public class TrayIconEventsTest {
+ private static boolean isOEL7;
TrayIcon icon;
ExtendedRobot robot;
@@ -77,6 +78,7 @@
"\"Always show all icons and notifications on the taskbar\" true " +
"to avoid this problem. Or change behavior only for Java SE " +
"tray icon.");
+ isOEL7 = SystemTrayIconHelper.isOel7();
new TrayIconEventsTest().doTest();
}
}
@@ -195,31 +197,44 @@
Point iconPosition = SystemTrayIconHelper.getTrayIconLocation(icon);
if (iconPosition == null)
throw new RuntimeException("Unable to find the icon location!");
+ if (isOEL7) {
+ // close tray
+ robot.mouseMove(100,100);
+ robot.click(InputEvent.BUTTON1_MASK);
+ robot.waitForIdle(2000);
+ }
robot.mouseMove(iconPosition.x, iconPosition.y);
- robot.waitForIdle(2000);
-
- SystemTrayIconHelper.doubleClick(robot);
+ robot.waitForIdle();
+ if(!isOEL7) {
+ SystemTrayIconHelper.doubleClick(robot);
- if (! actionPerformed) {
- synchronized (actionLock) {
- try {
- actionLock.wait(10000);
- } catch (Exception e) {
+ if (!actionPerformed) {
+ synchronized (actionLock) {
+ try {
+ actionLock.wait(10000);
+ } catch (Exception e) {
+ }
}
}
+ if (!actionPerformed)
+ throw new RuntimeException("FAIL: ActionEvent not triggered when TrayIcon is double clicked");
}
- if (! actionPerformed)
- throw new RuntimeException("FAIL: ActionEvent not triggered when TrayIcon is double clicked");
for (int i = 0; i < buttonTypes.length; i++) {
mousePressed = false;
- robot.mousePress(buttonTypes[i]);
+ if(isOEL7) {
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.click(buttonTypes[i]);
+ } else {
+ robot.mousePress(buttonTypes[i]);
+ }
if (! mousePressed) {
synchronized (pressLock) {
try {
- pressLock.wait(3000);
+ pressLock.wait(6000);
} catch (Exception e) {
}
}
@@ -231,12 +246,18 @@
mouseReleased = false;
mouseClicked = false;
- robot.mouseRelease(buttonTypes[i]);
+ if(isOEL7) {
+ SystemTrayIconHelper.openTrayIfNeeded(robot);
+ robot.mouseMove(iconPosition.x, iconPosition.y);
+ robot.click(buttonTypes[i]);
+ } else {
+ robot.mouseRelease(buttonTypes[i]);
+ }
if (! mouseReleased) {
synchronized (releaseLock) {
try {
- releaseLock.wait(3000);
+ releaseLock.wait(6000);
} catch (Exception e) {
}
}
@@ -248,7 +269,7 @@
if (! mouseClicked) {
synchronized (clickLock) {
try {
- clickLock.wait(3000);
+ clickLock.wait(6000);
} catch (Exception e) {
}
}
@@ -258,12 +279,14 @@
buttonNames[i] + " pressed & released");
}
- mouseMoved = false;
- robot.mouseMove(iconPosition.x + 100, iconPosition.y);
- robot.glide(iconPosition.x, iconPosition.y);
+ if (!isOEL7) {
+ mouseMoved = false;
+ robot.mouseMove(iconPosition.x + 100, iconPosition.y);
+ robot.glide(iconPosition.x, iconPosition.y);
- if (! mouseMoved)
- if (! SystemTrayIconHelper.skip(0) )
- throw new RuntimeException("FAIL: mouseMoved not triggered even when mouse moved over the icon");
+ if (!mouseMoved)
+ if (!SystemTrayIconHelper.skip(0))
+ throw new RuntimeException("FAIL: mouseMoved not triggered even when mouse moved over the icon");
+ }
}
}
--- a/jdk/test/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -66,6 +66,10 @@
} else {
if (System.getProperty("os.name").toLowerCase().startsWith("mac")) {
isMacOS = true;
+ } else if (SystemTrayIconHelper.isOel7()) {
+ System.out.println("OEL 7 doesn't support double click in " +
+ "systray. Skipped");
+ return;
}
new TrayIconMouseTest().doTest();
}
@@ -108,7 +112,7 @@
for (int i = 0; i < buttonTypes.length; i++) {
actionPerformed = false;
robot.click(buttonTypes[i]);
- robot.waitForIdle(2000);
+ robot.waitForIdle(6000);
if (isMacOS && actionPerformed && i == 2) {
@@ -155,7 +159,7 @@
if (! actionPerformed) {
synchronized (actionLock) {
try {
- actionLock.wait(3000);
+ actionLock.wait(6000);
} catch (Exception e) {
}
}
--- a/jdk/test/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java Thu Nov 26 19:12:28 2015 +0400
+++ b/jdk/test/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java Tue Dec 01 19:02:50 2015 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -127,7 +127,7 @@
robot.mousePress(InputEvent.BUTTON3_MASK);
robot.delay(50);
robot.mouseRelease(InputEvent.BUTTON3_MASK);
- robot.delay(1000);
+ robot.delay(6000);
robot.mouseMove(window.getLocation().x + 10, window.getLocation().y + 10);
robot.mousePress(InputEvent.BUTTON3_MASK);