Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-08-22 10:09:07 +0000
committerMarkus Keller2012-08-22 10:09:07 +0000
commit386f2895bf7503ce73c7e436582087c4b68ce898 (patch)
treec73992c7e50a726d73d80d3fad50b3181edbb23a /org.eclipse.ui.workbench.texteditor.tests
parent37bd66cd34291241f3e6273d9bed0b881a7abd9f (diff)
downloadeclipse.platform.text-386f2895bf7503ce73c7e436582087c4b68ce898.tar.gz
eclipse.platform.text-386f2895bf7503ce73c7e436582087c4b68ce898.tar.xz
eclipse.platform.text-386f2895bf7503ce73c7e436582087c4b68ce898.zip
Bug 379026: Test failures on GTK because workbench window doesn't have focus
only fail / take a screenshot when dialog is not active shell
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor.tests')
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
index a40509afd..9cbc64b8c 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
@@ -194,8 +194,9 @@ public class FindReplaceDialogTest extends TestCase {
event.doit= true;
findField.traverse(SWT.TRAVERSE_RETURN, event);
runEventQueue();
- if (Util.isGtk())
- takeScreenshot();
+ Shell shell= ((Shell)fFindReplaceDialog.get("fActiveShell"));
+ if (shell == null && Util.isGtk())
+ fail("this test does not work on GTK unless the runtime workbench has focus. Screenshot: " + takeScreenshot());
assertTrue(findField.isFocusControl());

Back to the top