Skip to content

Commit 33960cf

Browse files
naveen.n.narayananaivanov-jdk
authored andcommitted
8344581: [TESTBUG] java/awt/Robot/ScreenCaptureRobotTest.java failing on macOS
Backport-of: 0d30b869d8be831bfc5ff5511b3a42900e4c22a4
1 parent 6109c0b commit 33960cf

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ java/awt/Window/MainKeyWindowTest/TestMainKeyWindow.java 8265985 macosx-all
468468
java/awt/Robot/Delay/InterruptOfDelay.java 8265986 macosx-all
469469
java/awt/Robot/InfiniteLoopException.java 8342638 windows-all,linux-all
470470
java/awt/MenuBar/TestNoScreenMenuBar.java 8265987 macosx-all
471-
java/awt/Robot/ScreenCaptureRobotTest.java 8344581 macosx-all
472471

473472
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
474473
java/awt/Graphics2D/DrawString/RotTransText.java 8316878 linux-all

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)