aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2011-07-28 16:32:10 (EDT)
committerOleg Besedin2011-07-28 16:39:06 (EDT)
commitf6c71b74cbc4f2540af07ef594419c2e89fd04f9 (patch)
treee4fa1a437ac819cee82ceeb3b24b2143f306b57a
parent54bf6fa1538901d54a91399a51bb9e06e5913f8f (diff)
downloadeclipse.platform.ui-f6c71b74cbc4f2540af07ef594419c2e89fd04f9.zip
eclipse.platform.ui-f6c71b74cbc4f2540af07ef594419c2e89fd04f9.tar.gz
eclipse.platform.ui-f6c71b74cbc4f2540af07ef594419c2e89fd04f9.tar.bz2
Bug 353366 - Tests failures for empty label width (testSaveAs,
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