8233551: [TESTBUG] SelectEditTableCell.java fails on MacOS
Reviewed-by: psadhukhan
This commit is contained in:
parent
c638618814
commit
9b3fb5d1d5
@ -835,7 +835,6 @@ javax/swing/text/StyledEditorKit/4506788/bug4506788.java 8233562 macosx-all
|
||||
javax/swing/text/JTextComponent/6361367/bug6361367.java 8233569 macosx-all
|
||||
javax/swing/text/html/HTMLEditorKit/5043626/bug5043626.java 233570 macosx-all
|
||||
javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java 8233635 macosx-all
|
||||
javax/swing/JTable/7124218/SelectEditTableCell.java 8233551 macosx-all
|
||||
javax/swing/JRootPane/4670486/bug4670486.java 8042381 macosx-all
|
||||
javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java 8233555 macosx-all
|
||||
javax/swing/JRadioButton/8075609/bug8075609.java 8233555 macosx-all
|
||||
|
@ -50,23 +50,28 @@ public class SelectEditTableCell {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
robot = new Robot();
|
||||
robot.delay(2000);
|
||||
robot.setAutoDelay(100);
|
||||
UIManager.LookAndFeelInfo[] lookAndFeelArray
|
||||
= UIManager.getInstalledLookAndFeels();
|
||||
for (UIManager.LookAndFeelInfo lookAndFeelItem : lookAndFeelArray) {
|
||||
executeCase(lookAndFeelItem.getClassName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void executeCase(String lookAndFeelString) throws Exception {
|
||||
if (tryLookAndFeel(lookAndFeelString)) {
|
||||
createUI(lookAndFeelString);
|
||||
robot.delay(2000);
|
||||
runTestCase();
|
||||
robot.delay(2000);
|
||||
cleanUp();
|
||||
robot.delay(2000);
|
||||
try {
|
||||
if (tryLookAndFeel(lookAndFeelString)) {
|
||||
createUI(lookAndFeelString);
|
||||
robot.delay(2000);
|
||||
runTestCase();
|
||||
robot.delay(2000);
|
||||
cleanUp();
|
||||
robot.delay(2000);
|
||||
}
|
||||
} finally {
|
||||
if (frame != null) {
|
||||
SwingUtilities.invokeAndWait(frame::dispose);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -100,6 +105,7 @@ public class SelectEditTableCell {
|
||||
robot.mouseMove(centerPoint.x, centerPoint.y);
|
||||
robot.mousePress(InputEvent.BUTTON1_MASK);
|
||||
robot.mouseRelease(InputEvent.BUTTON1_MASK);
|
||||
robot.waitForIdle();
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -112,7 +118,7 @@ public class SelectEditTableCell {
|
||||
}
|
||||
}
|
||||
});
|
||||
robot.waitForIdle();
|
||||
|
||||
int fetchKeyCode;
|
||||
keyTap(fetchKeyCode = isMac(lookAndFeel)
|
||||
? KeyEvent.VK_ENTER : KeyEvent.VK_SPACE);
|
||||
@ -129,7 +135,7 @@ public class SelectEditTableCell {
|
||||
}
|
||||
}
|
||||
});
|
||||
robot.waitForIdle();
|
||||
|
||||
keyTap(KeyEvent.VK_SPACE);
|
||||
robot.waitForIdle();
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@ -149,10 +155,12 @@ public class SelectEditTableCell {
|
||||
}
|
||||
}
|
||||
});
|
||||
robot.waitForIdle();
|
||||
|
||||
// hitting a letter key will start editing
|
||||
keyTap(KeyEvent.VK_A);
|
||||
robot.waitForIdle();
|
||||
keyTap(KeyEvent.VK_SPACE);
|
||||
robot.waitForIdle();
|
||||
keyTap(KeyEvent.VK_A);
|
||||
robot.waitForIdle();
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user