Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2014-03-03 18:48:29 +0000
committerMarkus Keller2014-03-03 18:48:29 +0000
commitce8cdb5940f1e8f59d314868ad6d1676979db605 (patch)
treeb48ef95b5e715619f04e04604708f862eb8943dc
parent9636aeed9ef5cb681a2f22db8ff2177a45414671 (diff)
downloadeclipse.platform.text-ce8cdb5940f1e8f59d314868ad6d1676979db605.tar.gz
eclipse.platform.text-ce8cdb5940f1e8f59d314868ad6d1676979db605.tar.xz
eclipse.platform.text-ce8cdb5940f1e8f59d314868ad6d1676979db605.zip
fixed test name for non-Windows platforms
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
index 03c43ba2083..a3e778455ae 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 IBM Corporation and others.
+ * Copyright (c) 2012, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
@@ -45,9 +46,11 @@ public class ScreenshotTest extends TestCase {
}
+ public void testScreenshot() throws Exception {
+ takeScreenshot(ScreenshotTest.class, getName(), System.out);
+ }
+
public void testWindowsTaskManagerScreenshots() throws Exception {
- takeScreenshot(ScreenshotTest.class, getName() + 1, System.out);
-
if (! Util.isWindows())
return;
@@ -130,13 +133,16 @@ public class ScreenshotTest extends TestCase {
out.println("Shells: ");
for (int i = 0; i < shells.length; i++) {
Shell shell = shells[i];
- out.println((shell.isVisible() ? " visible: " : " invisible: ") + shell);
+ out.print((shell.isVisible() ? " visible: " : " invisible: ") + shell);
+ out.println(" @ " + shell.getBounds().toString());
}
}
// Take a screenshot:
GC gc = new GC(display);
- final Image image = new Image(display, display.getBounds());
+ Rectangle displayBounds= display.getBounds();
+ out.println("Display @ " + displayBounds);
+ final Image image = new Image(display, displayBounds);
gc.copyArea(image, 0, 0);
gc.dispose();

Back to the top