summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/AbstractTestApplication.java')
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractTestApplication.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java b/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java
new file mode 100644
index 0000000000..406158e8e1
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java
@@ -0,0 +1,23 @@
+package com.vaadin.tests.components;
+
+import com.vaadin.Application;
+import com.vaadin.server.AbstractWebApplicationContext;
+import com.vaadin.server.WebBrowser;
+import com.vaadin.service.ApplicationContext;
+
+public abstract class AbstractTestApplication extends Application {
+ protected abstract String getTestDescription();
+
+ protected abstract Integer getTicketNumber();
+
+ protected WebBrowser getBrowser() {
+ ApplicationContext context = getContext();
+ if (context instanceof AbstractWebApplicationContext) {
+ WebBrowser webBrowser = ((AbstractWebApplicationContext) context)
+ .getBrowser();
+ return webBrowser;
+ }
+
+ return null;
+ }
+}