Skip to content

Commit 93dadbe

Browse files
committed
7190589: [macosx] In the test bug4278839 never press ctrl+arrow
Reviewed-by: prr
1 parent 57d903b commit 93dadbe

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/jdk/javax/swing/text/DefaultEditorKit/4278839/bug4278839.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2020, 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
@@ -62,12 +62,6 @@ public void run() {
6262
robo.waitForIdle();
6363

6464
area.setCaretPosition(0);
65-
66-
if ("Aqua".equals(UIManager.getLookAndFeel().getID())) {
67-
Util.hitKeys(robo, KeyEvent.VK_HOME);
68-
} else {
69-
Util.hitKeys(robo, KeyEvent.VK_CONTROL, KeyEvent.VK_HOME);
70-
}
7165
robo.waitForIdle();
7266

7367
passed &= moveCaret(true) == 1;
@@ -152,6 +146,7 @@ private static void createAndShowGUI() {
152146
frame = new JFrame();
153147
frame.setTitle("Bug# 4278839");
154148
frame.setSize(200, 200);
149+
frame.setLocationRelativeTo(null);
155150
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
156151
area = new JTextArea("\naaa bbb\nccc ddd\n");
157152
frame.getContentPane().add(new JScrollPane(area));

0 commit comments

Comments
 (0)