Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2014-08-20 20:32:18 +0000
committerAlexander Kurtakov2014-08-20 20:32:18 +0000
commit0239458e6bda26f1314920602a89c80a1a370c4a (patch)
tree4bb96b74c8efe96890d3ea2c67969724abc30507
parentaca0d61d02d841a830f1228ef02b817040340ccf (diff)
downloadeclipse.platform.swt-0239458e6bda26f1314920602a89c80a1a370c4a.tar.gz
eclipse.platform.swt-0239458e6bda26f1314920602a89c80a1a370c4a.tar.xz
eclipse.platform.swt-0239458e6bda26f1314920602a89c80a1a370c4a.zip
Bug 441791 - Remove motif specific things from codebase
Remove motif left overs in tests. Change-Id: If7d99a55542ea5350de8088aa800265615f3d5b5 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java8
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java17
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser8.java2
9 files changed, 11 insertions, 89 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
index bcc21fb65f..f3ada43d7e 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
@@ -63,7 +63,6 @@ public class SwtTestUtil {
public final static boolean isWindows = SWT.getPlatform().startsWith("win32");
public final static boolean isCarbon = SWT.getPlatform().startsWith("carbon");
public final static boolean isCocoa = SWT.getPlatform().startsWith("cocoa");
- public final static boolean isMotif = SWT.getPlatform().equals("motif");
public final static boolean isGTK = SWT.getPlatform().equals("gtk");
public final static boolean isPhoton = SWT.getPlatform().equals("photon");
public final static boolean isLinux = System.getProperty("os.name").equals("Linux");
@@ -73,12 +72,7 @@ public class SwtTestUtil {
public final static boolean isWPF = SWT.getPlatform().startsWith("wpf");
static {
- if (isMotif) {
- testFontName = "misc-fixed";
- }
- else {
- testFontName = "Helvetica";
- }
+ testFontName = "Helvetica";
}
public static void assertSWTProblem(String message, int expectedCode, Throwable actualThrowable) {
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java
index bf6c79291b..723a0af9b5 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java
@@ -142,7 +142,7 @@ public void test_setNameLjava_lang_String() {
assertEquals("Wrong name", fontData.getName(), "bad-font");
// valid name (empty string, but valid)
- // only on windows since motif supports separate font foundries
+ // only on windows
if (SwtTestUtil.isWindows) {
fontData.setName("");
assertEquals("Wrong name", fontData.getName(), "");
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
index 17d3cf240a..23598a1f9b 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
@@ -348,30 +348,6 @@ public void test_setBoundsLorg_eclipse_swt_graphics_Rectangle() {
// r1.height += 100;
// }
// }
-// /* motif */
-// /* note that there is a minimum size for a shell, this test will fail if p1.x < 112 or p1.y < 27 */
-// /* note that there is a maximum size for a shell, this test will fail if p1.x > 1292 or p1.y > 1036 */
-// if (SwtTestUtil.isMotif) {
-// Point p1 = new Point(15,35);
-// Rectangle r1 = new Rectangle(20, 30, p1.x, p1.y);
-// Rectangle r2;
-//
-// for (int i = 0; i < 15; i++) {
-// testShell.setBounds(r1);
-// r2 = testShell.getBounds();
-// assert("child shell iteration " + i + " set=" + r1 + " get=" + r2, r1.equals(r2));
-// r1.width += 100;
-// r1.height += 100;
-// }
-// r1 = new Rectangle(50, 50, p1.x, p1.y);
-// for (int i = 0; i < 11; i++) {
-// shell.setBounds(r1);
-// r2 = shell.getBounds();
-// assert("parent shell iteration " + i + " set=" + r1 + " get=" + r2, r1.equals(r2));
-// r1.width += 100;
-// r1.height += 100;
-// }
-// }
}
//TODO This test was not hooked for running with the runTest override. It fails on GTK/Cocoa. Investigate.
public void a_test_setRegion() {
@@ -416,25 +392,6 @@ public void test_setSizeII() {
}
}
- /* motif */
- /* note that there is a minimum size for a shell, this test will fail if p1.x < ?? or p1.y < ?? */
- /* note that there is a maximum size for a shell, this test will fail if p1.x > ?? or p1.y > ?? */
- if (SwtTestUtil.isMotif) {
- Point newSize = new Point(2, 2);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize.x, newSize.y);
- assertEquals(newSize, testShell.getSize());
- newSize.x += 100;
- newSize.y += 100;
- }
- newSize = new Point(1600, 1600);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize.x, newSize.y);
- assertEquals(newSize, testShell.getSize());
- newSize.x -= 100;
- newSize.y -= 100;
- }
- }
}
@Override
@@ -458,26 +415,6 @@ public void test_setSizeLorg_eclipse_swt_graphics_Point() {
newSize.y -= 100;
}
}
-
- /* motif */
- /* note that there is a minimum size for a shell, this test will fail if p1.x < ?? or p1.y < ?? */
- /* note that there is a maximum size for a shell, this test will fail if p1.x > ?? or p1.y > ?? */
- if (SwtTestUtil.isMotif) {
- Point newSize = new Point(2, 2);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize);
- assertEquals(newSize, testShell.getSize());
- newSize.x += 100;
- newSize.y += 100;
- }
- newSize = new Point(1600, 1600);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize);
- assertEquals(newSize, testShell.getSize());
- newSize.x -= 100;
- newSize.y -= 100;
- }
- }
}
Shell testShell;
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
index d6a62921ed..9cb4330a17 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
@@ -527,8 +527,6 @@ public void test_getLineDelimiter() {
String delimiter = text.getLineDelimiter();
if (platform.equals("win32")) {
assertTrue(":a:", delimiter.equals("\r\n"));
- } else if (platform.equals("motif")) {
- assertTrue(":a:", delimiter.equals("\n"));
}
}
@@ -580,7 +578,7 @@ public void test_getSelectionText() {
public void test_getTabs() {
if (SWT.getPlatform().equals("win32")) {
- // API not supported on all platforms (e.g., Motif)
+ // API not supported on all platforms
text.setTabs(1);
assertTrue(":a:", text.getTabs() == 1);
text.setTabs(8);
@@ -1227,16 +1225,9 @@ public void test_setSelectionLorg_eclipse_swt_graphics_Point() {
}
public void test_setTabsI() {
- if (SwtTestUtil.isMotif) {
- for (int i = 0; i < 200; i++) {
- text.setTabs(i);
- assertEquals(8, text.getTabs());
- }
- } else {
- for (int i = 0; i < 200; i++) {
- text.setTabs(i);
- assertEquals(i, text.getTabs());
- }
+ for (int i = 0; i < 200; i++) {
+ text.setTabs(i);
+ assertEquals(i, text.getTabs());
}
}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java
index 5a489488eb..a8806c1eca 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java
@@ -22,7 +22,7 @@ public class Browser1 {
public static boolean locationChanging = false;
public static boolean locationChanged = false;
public static boolean progressCompleted = false;
- public static boolean isMozilla = SwtTestUtil.isGTK || SwtTestUtil.isMotif;
+ public static boolean isMozilla = SwtTestUtil.isGTK;
public static boolean test1(String url) {
if (verbose) System.out.println("URL Loading - args: "+url+" Expected Event Sequence: Location.changing > Location.changed (top true)> Progress.completed");
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java
index 25cdbef0d3..7f9224e6a7 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java
@@ -22,7 +22,7 @@ public class Browser2 {
public static boolean locationChanging = false;
public static boolean locationChanged = false;
public static boolean progressCompleted = false;
- public static boolean isMozilla = SwtTestUtil.isGTK || SwtTestUtil.isMotif;
+ public static boolean isMozilla = SwtTestUtil.isGTK;
public static boolean test1(String html) {
if (verbose) System.out.println("setText - args: "+html+" Expected Event Sequence: Location.changing > Location.changed > Progress.completed");
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java
index a8fb7ec5a7..8f9f232384 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java
@@ -28,7 +28,7 @@ public class Browser5 {
static int index = 0;
static int cntPassed = 0;
static int cntClosed = 0;
- public static boolean isMozilla = SwtTestUtil.isGTK || SwtTestUtil.isMotif;
+ public static boolean isMozilla = SwtTestUtil.isGTK;
public static boolean test1(String url) {
if (verbose) System.out.println("javascript window.open with location and size parameters - args: "+url+"\n Expected Event Sequence: Visibility.show");
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java
index fb31a05755..7cf330fe30 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java
@@ -19,7 +19,7 @@ import org.eclipse.swt.*;
public class Browser6 {
public static boolean verbose = false;
public static boolean passed = false;
- public static boolean isMozilla = SwtTestUtil.isGTK || SwtTestUtil.isMotif;
+ public static boolean isMozilla = SwtTestUtil.isGTK;
public static boolean test1(String url) {
if (verbose) System.out.println("URL Loading, verify get title event - args: "+url+" Expected Event Sequence: Title.changed");
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser8.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser8.java
index 7a0e5a9c5b..7571ed91b6 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser8.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser8.java
@@ -19,7 +19,7 @@ import org.eclipse.swt.*;
public class Browser8 {
public static boolean verbose = false;
public static boolean passed = false;
- public static boolean isMozilla = SwtTestUtil.isGTK || SwtTestUtil.isMotif;
+ public static boolean isMozilla = SwtTestUtil.isGTK;
static String html[] = {"<html><title>Snippet</title><body><p id='myid'>Best Friends</p><p id='myid2'>Cat and Dog</p></body></html>"};
static String script[] = {

Back to the top