diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-20 19:19:47 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-20 19:20:09 +0300 |
commit | 72d9cc9ec098952dfdb03708f808da555307e78d (patch) | |
tree | d2e97757e8a1ecdcf25cfec3b066c87a2db6c791 /tests/server-side | |
parent | 0dfdb151913a13e929a65c4dd8b5987c9edd06d5 (diff) | |
download | vaadin-framework-72d9cc9ec098952dfdb03708f808da555307e78d.tar.gz vaadin-framework-72d9cc9ec098952dfdb03708f808da555307e78d.zip |
Add RootProvider for Root selection without custom Application (#8159)
Diffstat (limited to 'tests/server-side')
-rw-r--r-- | tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java b/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java index fa730515a2..74770f8652 100644 --- a/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java +++ b/tests/server-side/com/vaadin/tests/server/component/root/CustomRootClassLoader.java @@ -6,15 +6,16 @@ import java.util.Properties; import junit.framework.TestCase; +import org.easymock.EasyMock; + import com.vaadin.Application; import com.vaadin.Application.ApplicationStartEvent; import com.vaadin.RootRequiresMoreInformationException; +import com.vaadin.terminal.DefaultRootProvider; import com.vaadin.terminal.DeploymentConfiguration; import com.vaadin.terminal.WrappedRequest; import com.vaadin.ui.Root; -import org.easymock.EasyMock; - public class CustomRootClassLoader extends TestCase { /** @@ -111,10 +112,17 @@ public class CustomRootClassLoader extends TestCase { private Application createStubApplication() { return new Application() { + { + addRootProvider(new DefaultRootProvider()); + } + @Override - protected String getRootClassName(WrappedRequest request) { - // Always use the same root class - return MyRoot.class.getName(); + public String getProperty(String name) { + if (name.equals(ROOT_PARAMETER)) { + return MyRoot.class.getName(); + } else { + return super.getProperty(name); + } } @Override |