aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-09-17 08:37:29 +0000
committerArtur Signell <artur.signell@itmill.com>2010-09-17 08:37:29 +0000
commit1c96aa8a8df3706a3f89e70ba591468ebcd77d1c (patch)
treec057f9e1bcac9711621eaf3aadcaf1948aacd3dc
parentb0f1e5c35caa174c2152924df5677191897e7cca (diff)
downloadvaadin-framework-1c96aa8a8df3706a3f89e70ba591468ebcd77d1c.tar.gz
vaadin-framework-1c96aa8a8df3706a3f89e70ba591468ebcd77d1c.zip
Provide browser information to the test cases
svn changeset:14980/svn branch:6.4
-rw-r--r--tests/src/com/vaadin/tests/components/AbstractTestCase.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/AbstractTestCase.java b/tests/src/com/vaadin/tests/components/AbstractTestCase.java
index 6653f0ca7f..ded579f58c 100644
--- a/tests/src/com/vaadin/tests/components/AbstractTestCase.java
+++ b/tests/src/com/vaadin/tests/components/AbstractTestCase.java
@@ -1,6 +1,9 @@
package com.vaadin.tests.components;
import com.vaadin.Application;
+import com.vaadin.service.ApplicationContext;
+import com.vaadin.terminal.gwt.server.AbstractWebApplicationContext;
+import com.vaadin.terminal.gwt.server.WebBrowser;
public abstract class AbstractTestCase extends Application {
@@ -8,4 +11,14 @@ public abstract class AbstractTestCase extends Application {
protected abstract Integer getTicketNumber();
+ protected WebBrowser getBrowser() {
+ ApplicationContext context = getContext();
+ if (context instanceof AbstractWebApplicationContext) {
+ WebBrowser webBrowser = ((AbstractWebApplicationContext) context)
+ .getBrowser();
+ return webBrowser;
+ }
+
+ return null;
+ }
}