diff options
author | Markus Keller | 2014-03-03 18:48:29 +0000 |
---|---|---|
committer | Markus Keller | 2014-03-03 18:48:29 +0000 |
commit | ce8cdb5940f1e8f59d314868ad6d1676979db605 (patch) | |
tree | b48ef95b5e715619f04e04604708f862eb8943dc | |
parent | 9636aeed9ef5cb681a2f22db8ff2177a45414671 (diff) | |
download | eclipse.platform.text-ce8cdb5940f1e8f59d314868ad6d1676979db605.tar.gz eclipse.platform.text-ce8cdb5940f1e8f59d314868ad6d1676979db605.tar.xz eclipse.platform.text-ce8cdb5940f1e8f59d314868ad6d1676979db605.zip |
print shell/display bounds for bug 428631Y20140309-0500Y20140308-1100I20140401-0800I20140325-0830I20140318-0830I20140311-1200I20140311-0800I20140309-0800I20140306-1200I20140305-2000I20140305-0800I20140304-2000I20140304-0800I20140303-2000
fixed test name for non-Windows platforms
-rw-r--r-- | org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/ScreenshotTest.java | 16 |
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(); |