aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2014-02-19 15:47:14 (EST)
committerGerrit Code Review @ Eclipse.org2014-02-20 09:52:04 (EST)
commiteee261ed514929a5321b7b3687478ba0dcb3b378 (patch)
tree2c90ae7829ac4edb74d1288984e78287e7993d6b
parent8851254da4d01655852cc9e03a17cd39204cb17e (diff)
downloadeclipse.platform.ui-eee261ed514929a5321b7b3687478ba0dcb3b378.zip
eclipse.platform.ui-eee261ed514929a5321b7b3687478ba0dcb3b378.tar.gz
eclipse.platform.ui-eee261ed514929a5321b7b3687478ba0dcb3b378.tar.bz2
bug 366608: [KeyBindings] [Compatibility] Failures in KeysTestSuite refs/changes/60/22260/2
Fix new tests on Mac. Change-Id: I264c4eab2f90ea939ac123bf8d5724f577d6f4ef
-rw-r--r--tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java
index 2075d1f..0dd6156 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/keys/BindingPersistenceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -321,7 +321,7 @@ public final class BindingPersistenceTest extends UITestCase {
.getCommand(IWorkbenchCommandConstants.WINDOW_ACTIVATE_EDITOR),
null);
- final KeySequence keyF12 = KeySequence.getInstance("F12");
+ final KeySequence keyF12 = Util.isMac() ? KeySequence.getInstance("M1+F12") : KeySequence.getInstance("F12");
final KeySequence keyAltCtrlShiftI = KeySequence
.getInstance("ALT+CTRL+SHIFT+I");
final Binding editorBinding = bindingService.getPerfectMatch(keyF12);
@@ -394,7 +394,7 @@ public final class BindingPersistenceTest extends UITestCase {
.getCommand(IWorkbenchCommandConstants.WINDOW_ACTIVATE_EDITOR),
null);
- final KeySequence keyF12 = KeySequence.getInstance("F12");
+ final KeySequence keyF12 = Util.isMac() ? KeySequence.getInstance("M1+F12") : KeySequence.getInstance("F12");
final Binding editorBinding = bindingService.getPerfectMatch(keyF12);
assertNotNull(editorBinding);
assertEquals(activateEditorCmd, editorBinding.getParameterizedCommand());
@@ -532,6 +532,7 @@ public final class BindingPersistenceTest extends UITestCase {
final KeySequence keyCtrlY = KeySequence.getInstance("CTRL+Y");
final KeySequence keyCtrlShiftZ = KeySequence.getInstance("CTRL+SHIFT+Z");
+ final KeySequence keyMacRedo = KeySequence.getInstance("M1+M2+Z");
final Binding pasteBinding = bindingService.getPerfectMatch(keyCtrlY);
assertNotNull(pasteBinding);
@@ -543,6 +544,8 @@ public final class BindingPersistenceTest extends UITestCase {
Binding redoBinding = null;
if (Util.isGtk()) {
redoBinding = bindingService.getPerfectMatch(keyCtrlShiftZ);
+ } else if(Util.isMac()) {
+ redoBinding = bindingService.getPerfectMatch(keyMacRedo);
} else {
redoBinding = bindingService.getPerfectMatch(keyCtrlY);
}