summaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-08-31 19:27:09 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-03 14:05:28 +0300
commit094fabccf991fae1efd507a8a993fce1bc547b89 (patch)
tree43fb6f7c9f983afa1835085614b6579862f67c99 /uitest/src
parent169920045e870e307dee9e2447487a9befc896c7 (diff)
downloadvaadin-framework-094fabccf991fae1efd507a8a993fce1bc547b89.tar.gz
vaadin-framework-094fabccf991fae1efd507a8a993fce1bc547b89.zip
Rename AbstractWebApplicationContext to ApplicationContext (#9402)
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/com/vaadin/tests/applicationcontext/RemoveTransactionListener.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractTestApplication.java12
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractTestCase.java11
-rw-r--r--uitest/src/com/vaadin/tests/components/AbstractTestUI.java11
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();
}
}