diff options
Diffstat (limited to 'uitest/src')
4 files changed, 11 insertions, 27 deletions
diff --git a/uitest/src/com/vaadin/tests/applicationcontext/RemoveTransactionListener.java b/uitest/src/com/vaadin/tests/applicationcontext/RemoveTransactionListener.java index f1730ed5f5..5927e9c19f 100644 --- a/uitest/src/com/vaadin/tests/applicationcontext/RemoveTransactionListener.java +++ b/uitest/src/com/vaadin/tests/applicationcontext/RemoveTransactionListener.java @@ -1,8 +1,8 @@ package com.vaadin.tests.applicationcontext; import com.vaadin.Application; -import com.vaadin.service.ApplicationContext; -import com.vaadin.service.ApplicationContext.TransactionListener; +import com.vaadin.server.ApplicationContext; +import com.vaadin.server.ApplicationContext.TransactionListener; import com.vaadin.tests.components.TestBase; import com.vaadin.tests.util.Log; diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java b/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java index 406158e8e1..db17c67fdd 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java +++ b/uitest/src/com/vaadin/tests/components/AbstractTestApplication.java @@ -1,9 +1,8 @@ package com.vaadin.tests.components; import com.vaadin.Application; -import com.vaadin.server.AbstractWebApplicationContext; +import com.vaadin.server.ApplicationContext; import com.vaadin.server.WebBrowser; -import com.vaadin.service.ApplicationContext; public abstract class AbstractTestApplication extends Application { protected abstract String getTestDescription(); @@ -12,12 +11,7 @@ public abstract class AbstractTestApplication extends Application { protected WebBrowser getBrowser() { ApplicationContext context = getContext(); - if (context instanceof AbstractWebApplicationContext) { - WebBrowser webBrowser = ((AbstractWebApplicationContext) context) - .getBrowser(); - return webBrowser; - } - - return null; + WebBrowser webBrowser = context.getBrowser(); + return webBrowser; } } diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestCase.java b/uitest/src/com/vaadin/tests/components/AbstractTestCase.java index 4e2ec1d935..f51c74d4a8 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractTestCase.java +++ b/uitest/src/com/vaadin/tests/components/AbstractTestCase.java @@ -1,9 +1,8 @@ package com.vaadin.tests.components; import com.vaadin.Application; -import com.vaadin.server.AbstractWebApplicationContext; +import com.vaadin.server.ApplicationContext; import com.vaadin.server.WebBrowser; -import com.vaadin.service.ApplicationContext; public abstract class AbstractTestCase extends Application.LegacyApplication { @@ -13,12 +12,8 @@ public abstract class AbstractTestCase extends Application.LegacyApplication { protected WebBrowser getBrowser() { ApplicationContext context = getContext(); - if (context instanceof AbstractWebApplicationContext) { - WebBrowser webBrowser = ((AbstractWebApplicationContext) context) - .getBrowser(); - return webBrowser; - } + WebBrowser webBrowser = context.getBrowser(); + return webBrowser; - return null; } } diff --git a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java index ff235c5d9f..21eda56891 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractTestUI.java +++ b/uitest/src/com/vaadin/tests/components/AbstractTestUI.java @@ -1,10 +1,9 @@ package com.vaadin.tests.components; import com.vaadin.Application; -import com.vaadin.server.AbstractWebApplicationContext; +import com.vaadin.server.ApplicationContext; import com.vaadin.server.WebBrowser; import com.vaadin.server.WrappedRequest; -import com.vaadin.service.ApplicationContext; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.ui.Component; import com.vaadin.ui.Label; @@ -58,12 +57,8 @@ public abstract class AbstractTestUI extends UI { protected WebBrowser getBrowser() { ApplicationContext context = Application.getCurrent().getContext(); - if (context instanceof AbstractWebApplicationContext) { - AbstractWebApplicationContext webContext = (AbstractWebApplicationContext) context; - return webContext.getBrowser(); - } - - return null; + ApplicationContext webContext = context; + return webContext.getBrowser(); } } |