aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java')
-rw-r--r--test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java b/test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java
index 8d8336d..dc0c06f 100644
--- a/test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java
+++ b/test/net/java/sip/communicator/slick/popupmessagehandler/PopupMessageHandlerSLick.java
@@ -6,10 +6,10 @@
*/
package net.java.sip.communicator.slick.popupmessagehandler;
-import java.awt.*;
import java.util.*;
import junit.framework.*;
+import net.java.sip.communicator.service.systray.*;
import net.java.sip.communicator.util.*;
import org.osgi.framework.*;
@@ -30,11 +30,6 @@ public class PopupMessageHandlerSLick extends TestSuite implements BundleActivat
/** implements BundleActivator.start() */
public void start(BundleContext bc) throws Exception
{
- // if we are running in headless mode we will miss the systray service
- // as the corresponding classes are not available, skip it
- if(GraphicsEnvironment.isHeadless())
- return;
-
logger.info("starting popup message test ");
bundleContext = bc;
@@ -45,7 +40,12 @@ public class PopupMessageHandlerSLick extends TestSuite implements BundleActivat
properties.put("service.pid", getName());
- addTest(TestPopupMessageHandler.suite());
+ // we maybe are running on machine without WM and systray
+ // (test server machine), skip tests
+ if(ServiceUtils.getService(bc, SystrayService.class) != null)
+ {
+ addTest(TestPopupMessageHandler.suite());
+ }
bundleContext.registerService(getClass().getName(), this, properties);
}