Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-08-28 14:26:00 +0000
committerMarkus Keller2012-08-28 14:26:00 +0000
commitf16d0f043c6ca07b6b702093819a33d1a99a5c48 (patch)
tree3fedb99b3ef29f23d724e96ec2adcc29fe859fab /org.eclipse.ui.workbench.texteditor.tests
parent61eb7c2f54751c7860b33e1a6bc644a3a43647da (diff)
downloadeclipse.platform.text-f16d0f043c6ca07b6b702093819a33d1a99a5c48.tar.gz
eclipse.platform.text-f16d0f043c6ca07b6b702093819a33d1a99a5c48.tar.xz
eclipse.platform.text-f16d0f043c6ca07b6b702093819a33d1a99a5c48.zip
try to track down gray screen on Windows: screenshot of Task Manager
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.java44
1 files changed, 42 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 ce3404cdf..35cb1ad02 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
@@ -197,8 +197,6 @@ public class FindReplaceDialogTest extends TestCase {
findField.traverse(SWT.TRAVERSE_RETURN, event);
runEventQueue();
- takeScreenshot(); //XXX: shoot unconditionally
-
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());
@@ -220,6 +218,48 @@ public class FindReplaceDialogTest extends TestCase {
assertTrue(allScopeBox.isFocusControl());
}
+ public void testWindowsTaskManagerScreenshots() throws Exception {
+ takeScreenshot(FindReplaceDialogTest.class, getName() + 1);
+
+ if (! Util.isWindows())
+ return;
+
+ Display display= Display.getDefault();
+
+ Event event= new Event();
+ event.type= SWT.KeyDown;
+ event.keyCode= SWT.CTRL;
+ System.out.println("* CTRL " + display.post(event));
+ event.keyCode= SWT.SHIFT;
+ System.out.println("* SHIFT " + display.post(event));
+ event.character= SWT.ESC;
+ event.keyCode= SWT.ESC;
+ System.out.println("* ESC " + display.post(event));
+
+ event.type= SWT.KeyUp;
+ System.out.println("* ESC up " + display.post(event));
+ event.character= 0;
+ event.keyCode= SWT.SHIFT;
+ System.out.println("* SHIFT up " + display.post(event));
+ event.keyCode= SWT.CTRL;
+ System.out.println("* CTRL up " + display.post(event));
+
+ runEventQueue();
+ display.beep();
+ takeScreenshot(FindReplaceDialogTest.class, getName() + 2);
+
+ event.type= SWT.KeyDown;
+ event.character= SWT.ESC;
+ event.keyCode= SWT.ESC;
+ System.out.println("* ESC " + display.post(event));
+ event.type= SWT.KeyUp;
+ System.out.println("* ESC up " + display.post(event));
+
+ runEventQueue();
+ display.beep();
+ takeScreenshot(FindReplaceDialogTest.class, getName() + 3);
+ }
+
private String takeScreenshot() {
return takeScreenshot(FindReplaceDialogTest.class, getName());
}

Back to the top