Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-07-12 23:39:35 -0400
committerSergey Prigogin2016-07-12 23:42:39 -0400
commit73fd0ef44b36fd04a8268b9600d4f21f91a43381 (patch)
treed9b82abd76678f85f9118c37a47509355e7eec0e /tests/org.eclipse.team.tests.core
parent30ce23c898392ba97114d8ba7cf5eddd7a0d6373 (diff)
downloadeclipse.platform.team-73fd0ef44b36fd04a8268b9600d4f21f91a43381.tar.gz
eclipse.platform.team-73fd0ef44b36fd04a8268b9600d4f21f91a43381.tar.xz
eclipse.platform.team-73fd0ef44b36fd04a8268b9600d4f21f91a43381.zip
Bug 213780 - Compare With direction should be configurableY20160714-1000I20160719-0800I20160716-1900
Fixed tests sensitive to the layout preference. Change-Id: Ib30bb4c7ac8b42a81d8e1e55a0f0a897de587b05
Diffstat (limited to 'tests/org.eclipse.team.tests.core')
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java
index 7591d873a..3daa4c94b 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/SaveableCompareEditorInputTest.java
@@ -16,14 +16,14 @@ import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.Test;
-
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.CompareViewerSwitchingPane;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
import org.eclipse.compare.internal.CompareEditor;
+import org.eclipse.compare.internal.ComparePreferencePage;
import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.ICompareUIConstants;
import org.eclipse.compare.internal.MergeSourceViewer;
import org.eclipse.compare.structuremergeviewer.Differencer;
import org.eclipse.compare.structuremergeviewer.ICompareInput;
@@ -36,6 +36,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Image;
@@ -48,6 +49,8 @@ import org.eclipse.team.tests.core.TeamTest;
import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
import org.eclipse.ui.PlatformUI;
+import junit.framework.Test;
+
public class SaveableCompareEditorInputTest extends TeamTest {
public static Test suite() {
@@ -67,6 +70,8 @@ public class SaveableCompareEditorInputTest extends TeamTest {
protected void setUp() throws Exception {
super.setUp();
+ IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
+ store.setDefault(ComparePreferencePage.LAYOUT, ICompareUIConstants.PREF_VALUE_RIGHT_TO_LEFT);
project = createProject("Project_", new String[] {
"File1.txt", "File2.txt" });
@@ -84,6 +89,8 @@ public class SaveableCompareEditorInputTest extends TeamTest {
protected void tearDown() throws Exception {
// remove log listener
RuntimeLog.removeLogListener(logListener);
+ IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
+ store.setToDefault(ComparePreferencePage.LAYOUT);
super.tearDown();
}

Back to the top