aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2011-07-28 16:32:10 (EDT)
committerOleg Besedin2011-07-28 16:32:10 (EDT)
commit5124978a6a83a94d276b0c2389e2d4ac40db7d13 (patch)
tree6ea38ba953e10ce70573bdb1ffa13203feb128e7
parent104188eb99f6de830ad20dca877ff31eb6abf43a (diff)
downloadeclipse.platform.ui-5124978a6a83a94d276b0c2389e2d4ac40db7d13.zip
eclipse.platform.ui-5124978a6a83a94d276b0c2389e2d4ac40db7d13.tar.gz
eclipse.platform.ui-5124978a6a83a94d276b0c2389e2d4ac40db7d13.tar.bz2
Bug 353366 - Tests failures for empty label width (testSaveAs,v20110728-2032
testExportResources, etc.)
-rw-r--r--tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java
index f7f0c37..3ce5d7c 100644
--- a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java
+++ b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 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
@@ -172,7 +172,9 @@ public class DialogCheck {
private static void verifyLabelText(Label label, Assert assertion) {
String widget = label.toString();
Point size = label.getSize();
-
+ String labelText = label.getText();
+ if (labelText.isEmpty())
+ return;
//compute the size with no line wrapping
Point preferred = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
//if (size.y/preferred.y) == X, then label spans X lines, so divide