Skip to content

Commit

Permalink
Review comments again
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonGuy committed Oct 8, 2024
1 parent 9651e64 commit 2c12445
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class DnDCursorCrashTest {
public static void main(String[] args) throws Exception {
try {
EventQueue.invokeAndWait(() -> {
frame.setTitle("Test frame");
frame.setTitle("DnD Cursor Test Frame");
frame.setLocation(200, 200);
frame.setLayout(new GridLayout(2, 1));
frame.add(dragSourcePanel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@
public class DnDRemoveFocusOwnerCrashTest {
public static final int FRAME_ACTIVATION_TIMEOUT = 1000;
public static Frame frame;
public static Robot robot;
public static DragSourceButton dragSourceButton;

public static void main(String[] args) throws Exception {
try {
robot = new Robot();
EventQueue.invokeAndWait(() -> {
frame = new Frame();
dragSourceButton = new DragSourceButton();
Expand All @@ -79,8 +81,8 @@ public static void main(String[] args) throws Exception {
frame.setVisible(true);

try {
Thread.sleep(FRAME_ACTIVATION_TIMEOUT);
} catch (InterruptedException e) {
robot.delay(FRAME_ACTIVATION_TIMEOUT);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("The test failed.");
}
Expand All @@ -95,7 +97,7 @@ public static void main(String[] args) throws Exception {
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
for (int dy = 0; dy < 50; dy++) {
robot.mouseMove(p.x, p.y + dy);
Thread.sleep(10);
robot.delay(10);
}
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.keyRelease(KeyEvent.VK_CONTROL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ public Object getTransferData(DataFlavor tdf) throws UnsupportedFlavorException
System.err.println("[Source] Ok");
return m_img;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public static void main(String[] args) throws Exception {
Open a native file browsing application, such as Windows
Explorer. Try to find a file whose name uses non-ISO 8859-1
characters. You will not be verifying the fix for 4187490 unless
you drag a file which contains non-ISO 8859-1 characters. Drag
characters. Create a file and name it such that it contains
non-ISO 8859-1 characters (For ex. é, à, ö, €, ¥). Drag
the file from the native application and drop it on the test
Frame. If the file name appears normally, then the test passes.
If boxes or question marks appear for characters, or if you see
Expand Down Expand Up @@ -155,4 +155,4 @@ public void drop(DropTargetDropEvent e) {
e.dropComplete(true);
showDrop(false);
}
}
}

0 comments on commit 2c12445

Please sign in to comment.