Skip to content

Commit f9d6ffc

Browse files
committed
Fix GTK4 shell location tests.
We cannot set/determine the location of the shell using Window Handle on GTK4. So fix the test not to test the set and get location on GTK4. see #2498
1 parent 79e69bb commit f9d6ffc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.eclipse.swt.graphics.Point;
3535
import org.eclipse.swt.graphics.Rectangle;
3636
import org.eclipse.swt.graphics.Region;
37+
import org.eclipse.swt.internal.gtk.GTK;
3738
import org.eclipse.swt.layout.FillLayout;
3839
import org.eclipse.swt.layout.GridLayout;
3940
import org.eclipse.swt.widgets.Button;
@@ -457,6 +458,10 @@ public void test_getImeInputMode() {
457458
@Override
458459
@Test
459460
public void test_getLocation() {
461+
//Setting location for Windows is not supported in GTK4
462+
if (GTK.GTK4) {
463+
return;
464+
}
460465
shell.setLocation(10,15);
461466
assertEquals(":a:", 10, shell.getLocation().x);
462467
assertEquals(":b:", 15, shell.getLocation().y);
@@ -999,4 +1004,22 @@ public void test_Issue450_NoShellActivateOnSetFocus() {
9991004
}
10001005
}
10011006
}
1007+
1008+
@Override
1009+
public void test_setLocationLorg_eclipse_swt_graphics_Point() {
1010+
//Setting location for Windows is not supported in GTK4
1011+
if (GTK.GTK4) {
1012+
return;
1013+
}
1014+
super.test_setLocationLorg_eclipse_swt_graphics_Point();
1015+
}
1016+
1017+
@Override
1018+
public void test_setLocationII() {
1019+
//Setting location for Windows is not supported in GTK4
1020+
if (GTK.GTK4) {
1021+
return;
1022+
}
1023+
super.test_setLocationII();
1024+
}
10021025
}

0 commit comments

Comments
 (0)