Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2011-02-18 19:27:40 +0000
committerPawel Piech2011-02-18 19:27:40 +0000
commit1d398349631cf55569fde0651464e16c4e8fb129 (patch)
tree7a96024e19af8327b55db731cab842f517e01fca /org.eclipse.debug.tests
parent3bb88ccb24cc83f6b290c77aa7ac6afd57026061 (diff)
downloadeclipse.platform.debug-1d398349631cf55569fde0651464e16c4e8fb129.tar.gz
eclipse.platform.debug-1d398349631cf55569fde0651464e16c4e8fb129.tar.xz
eclipse.platform.debug-1d398349631cf55569fde0651464e16c4e8fb129.zip
Bug 325465 - Virtual viewer tests timeout when viewer is hidden
- Removed the SWT.ON_TOP shell style on Macs.
Diffstat (limited to 'org.eclipse.debug.tests')
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java14
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ColumnPresentationTests.java11
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java14
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java14
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerTopIndexTests.java9
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/LazyTests.java14
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PopupTests.java14
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java14
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java12
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java14
10 files changed, 98 insertions, 32 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java
index 4f5d6e81f..ce354068d 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java
@@ -14,6 +14,7 @@ import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
@@ -47,10 +48,15 @@ abstract public class CheckTests extends TestCase {
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ColumnPresentationTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ColumnPresentationTests.java
index bed7df1cf..6edcc467d 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ColumnPresentationTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ColumnPresentationTests.java
@@ -15,6 +15,7 @@ import java.util.Arrays;
import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation2;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
@@ -64,9 +65,15 @@ public class ColumnPresentationTests extends TestCase implements ITestModelUpdat
void createViewer() {
fDisplay = PlatformUI.getWorkbench().getDisplay();
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ }
+ fShell.setSize(800, 600);
fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
fShell.setLayout(new FillLayout());
fViewer = new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
fViewer.getTree().addControlListener(new ControlListener() {
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java
index 0b01d1b15..b537da0ae 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java
@@ -19,6 +19,7 @@ import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
@@ -55,10 +56,15 @@ abstract public class ContentTests extends TestCase implements ITestModelUpdates
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java
index eebea2913..db1b3b878 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java
@@ -18,6 +18,7 @@ import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
@@ -50,11 +51,16 @@ abstract public class DeltaTests extends TestCase implements ITestModelUpdatesLi
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerTopIndexTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerTopIndexTests.java
index 6f407214c..0bc1186e3 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerTopIndexTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerTopIndexTests.java
@@ -49,8 +49,13 @@ public class JFaceViewerTopIndexTests extends TestCase implements ITestModelUpda
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- fShell.setSize(300, 100);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ }
+ fShell.setSize(300, 80);
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/LazyTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/LazyTests.java
index 198b4c1d1..96925b687 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/LazyTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/LazyTests.java
@@ -15,6 +15,7 @@ import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
@@ -49,10 +50,15 @@ abstract public class LazyTests extends TestCase implements ITestModelUpdatesLis
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PopupTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PopupTests.java
index 09ac030e9..3f8c1aaf8 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PopupTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PopupTests.java
@@ -19,6 +19,7 @@ import junit.framework.Assert;
import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
@@ -54,10 +55,15 @@ abstract public class PopupTests extends TestCase implements ITestModelUpdatesLi
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell, SWT.POP_UP);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java
index 09284206b..8b22fdbb4 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java
@@ -15,6 +15,7 @@ import java.util.List;
import junit.framework.TestCase;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
@@ -49,10 +50,15 @@ abstract public class SelectionTests extends TestCase implements ITestModelUpdat
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java
index 05736866c..cffd73468 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java
@@ -19,6 +19,7 @@ import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
@@ -53,6 +54,17 @@ abstract public class StateTests extends TestCase implements ITestModelUpdatesLi
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
+
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
+
fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
// Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
//fShell.setMaximized(true);
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java
index ffdf3a7ce..70a98f47a 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java
@@ -14,6 +14,7 @@ import junit.framework.TestCase;
import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
@@ -45,10 +46,15 @@ abstract public class UpdateTests extends TestCase implements ITestModelUpdatesL
*/
protected void setUp() throws Exception {
fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
- // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
- //fShell.setMaximized(true);
- fShell.setSize(800, 600);
+ // Tests end in DNF on Mac (bug 325465)
+ if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ fShell = new Shell(fDisplay);
+ fShell.setMaximized(true);
+ } else {
+ fShell = new Shell(fDisplay, SWT.ON_TOP | SWT.SHELL_TRIM);
+ // Maximizing a shell with SWT.ON_TOP doesn't work on Linux (bug 325465)
+ fShell.setSize(800, 600);
+ }
fShell.setLayout(new FillLayout());
fViewer = createViewer(fDisplay, fShell);

Back to the top