diff options
author | Eric Williams | 2019-01-21 19:06:45 +0000 |
---|---|---|
committer | Eric Williams | 2019-01-21 19:27:58 +0000 |
commit | a65c9d6b2c5e601ef4408fead79d294fa472a577 (patch) | |
tree | 2b952b932b9d86592f64ac377d6273097072c5c8 | |
parent | efcb2f5c02ee6c59ce8528251c18250115d669a2 (diff) | |
download | eclipse.platform.swt-a65c9d6b2c5e601ef4408fead79d294fa472a577.tar.gz eclipse.platform.swt-a65c9d6b2c5e601ef4408fead79d294fa472a577.tar.xz eclipse.platform.swt-a65c9d6b2c5e601ef4408fead79d294fa472a577.zip |
Disable failing test on Wayland
Change-Id: I7d0340a5694f7a72bb89a4a19f3411d8eda952b9
Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r-- | tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java | 47 |
1 files changed, 25 insertions, 22 deletions
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 0a599557f9..2947afd431 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 @@ -692,36 +692,39 @@ public void test_activateEventSend() { /** * Regression test for Bug 445900: [GTK] Shell#computeTrim(..) wrong for - * first invisible shell (editor hovers jump when enriched) + * first invisible shell (editor hovers jump when enriched). + * + * Disabled on Wayland as there is no absolute positioning. */ @Test public void test_setBounds() throws Exception { + if (SwtTestUtil.isX11) { + Rectangle bounds = new Rectangle(100, 200, 200, 200); + Rectangle bounds2 = new Rectangle(150, 250, 250, 250); - Rectangle bounds = new Rectangle(100, 200, 200, 200); - Rectangle bounds2 = new Rectangle(150, 250, 250, 250); - - StringBuilder log = new StringBuilder(); - int[] styles = { SWT.NO_TRIM, SWT.BORDER, SWT.RESIZE, SWT.TITLE | SWT.BORDER, SWT.TITLE | SWT.RESIZE, SWT.TITLE }; - for (int i = 0; i < styles.length; i++) { - Shell testShell = new Shell(shell, styles[i]); - try { - testShell.setBounds(bounds); - logUnlessEquals(log, i + ".1: style 0x" + Integer.toHexString(styles[i]), bounds, testShell.getBounds()); + StringBuilder log = new StringBuilder(); + int[] styles = { SWT.NO_TRIM, SWT.BORDER, SWT.RESIZE, SWT.TITLE | SWT.BORDER, SWT.TITLE | SWT.RESIZE, SWT.TITLE }; + for (int i = 0; i < styles.length; i++) { + Shell testShell = new Shell(shell, styles[i]); + try { + testShell.setBounds(bounds); + logUnlessEquals(log, i + ".1: style 0x" + Integer.toHexString(styles[i]), bounds, testShell.getBounds()); - testShell.open(); - logUnlessEquals(IS_GTK_BUG_445900 ? System.out : log, i + ".2: style 0x" + Integer.toHexString(styles[i]), bounds, testShell.getBounds()); + testShell.open(); + logUnlessEquals(IS_GTK_BUG_445900 ? System.out : log, i + ".2: style 0x" + Integer.toHexString(styles[i]), bounds, testShell.getBounds()); - testShell.setBounds(bounds); - logUnlessEquals(log, i + ".3: style 0x" + Integer.toHexString(styles[i]), bounds, testShell.getBounds()); + testShell.setBounds(bounds); + logUnlessEquals(log, i + ".3: style 0x" + Integer.toHexString(styles[i]), bounds, testShell.getBounds()); - testShell.setBounds(bounds2); - logUnlessEquals(log, i + ".4: style 0x" + Integer.toHexString(styles[i]), bounds2, testShell.getBounds()); - } finally { - testShell.dispose(); + testShell.setBounds(bounds2); + logUnlessEquals(log, i + ".4: style 0x" + Integer.toHexString(styles[i]), bounds2, testShell.getBounds()); + } finally { + testShell.dispose(); + } + } + if (log.length() > 0) { + Assert.fail(log.toString()); } - } - if (log.length() > 0) { - Assert.fail(log.toString()); } } |