Skip to content

Commit 9064155

Browse files
committed
8344581: [TESTBUG] java/awt/Robot/ScreenCaptureRobotTest.java failing on macOS
Reviewed-by: mbaesken Backport-of: 0d30b869d8be831bfc5ff5511b3a42900e4c22a4
1 parent df98efd commit 9064155

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/jdk/java/awt/Robot/ScreenCaptureRobotTest.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,17 @@
4444
* @bug 8342098
4545
* @summary Verify that the image captured from the screen using a Robot
4646
* and the source image are same.
47+
* @requires os.family == "mac"
48+
* @run main/othervm ScreenCaptureRobotTest
49+
*/
50+
51+
/*
52+
* @test
53+
* @key headful
54+
* @bug 8342098
55+
* @summary Verify that the image captured from the screen using a Robot
56+
* and the source image are same.
57+
* @requires os.family != "mac"
4758
* @run main/othervm -Dsun.java2d.uiScale=1 ScreenCaptureRobotTest
4859
*/
4960
public class ScreenCaptureRobotTest {
@@ -96,6 +107,7 @@ private static void initializeGUI() {
96107

97108
private static void doTest() throws Exception {
98109
Robot robot = new Robot();
110+
robot.mouseMove(0, 0);
99111
robot.waitForIdle();
100112
robot.delay(500);
101113

0 commit comments

Comments
 (0)