aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaruch Youssin2014-03-03 15:35:11 (EST)
committerBaruch Youssin2014-03-03 15:35:11 (EST)
commit880d43b7d4476ed623ec7640466028cac56ea27c (patch)
treef87d0f9a4b298722d5f96b90e5e4ed0c1e7d6ee2
parent009cb6bac6b9fabf9ce8d0c3456d6e334fa1734c (diff)
downloadorg.eclipse.nebula-880d43b7d4476ed623ec7640466028cac56ea27c.zip
org.eclipse.nebula-880d43b7d4476ed623ec7640466028cac56ea27c.tar.gz
org.eclipse.nebula-880d43b7d4476ed623ec7640466028cac56ea27c.tar.bz2
JUnit test case for the new Bug 429495 - Focus cannot be set to CDateTime programmatically on Ubunturefs/changes/23/22823/1
Added file: widgets/cdatetime/org.eclipse.nebula.widgets.cdatetime.tests/src/org/eclipse/nebula/widgets/cdatetime/TestFocusCDateTime.java Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=429495 Signed-off-by: Baruch Youssin <quququitty@yahoo.com>
-rw-r--r--widgets/cdatetime/org.eclipse.nebula.widgets.cdatetime.tests/src/org/eclipse/nebula/widgets/cdatetime/TestFocusCDateTime.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/widgets/cdatetime/org.eclipse.nebula.widgets.cdatetime.tests/src/org/eclipse/nebula/widgets/cdatetime/TestFocusCDateTime.java b/widgets/cdatetime/org.eclipse.nebula.widgets.cdatetime.tests/src/org/eclipse/nebula/widgets/cdatetime/TestFocusCDateTime.java
new file mode 100644
index 0000000..2262ef0
--- /dev/null
+++ b/widgets/cdatetime/org.eclipse.nebula.widgets.cdatetime.tests/src/org/eclipse/nebula/widgets/cdatetime/TestFocusCDateTime.java
@@ -0,0 +1,43 @@
+/****************************************************************************
+ * Copyright (c) 2014 the original authors
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Baruch Youssin
+ *****************************************************************************/
+package org.eclipse.nebula.widgets.cdatetime;
+
+import org.eclipse.nebula.cwt.test.AbstractVTestCase;
+
+/**
+ * This test fails on Ubuntu 12.04: successFocus = true but hasIndeedFocus = false.
+ * Reported as bug 429495.
+ */
+public class TestFocusCDateTime extends AbstractVTestCase {
+
+ private CdtTester tester;
+
+ /**
+ * @throws java.lang.Exception
+ */
+ protected void setUp() throws Exception {
+ tester = new CdtTester(getShell(), CDT.DATE_MEDIUM | CDT.TIME_MEDIUM);
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testFocusCDateTime(){
+ Boolean successFocus = tester.setFocus();
+ Boolean hasIndeedFocus = hasFocus(tester.getCDateTime());
+ assertTrue(successFocus);
+ assertTrue(hasIndeedFocus);
+ }
+}