summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-09-18 14:24:37 +0300
committerArtur Signell <artur@vaadin.com>2012-09-18 14:24:58 +0300
commitc93035c9812b33718195c829a7231347e095b549 (patch)
tree44c57c251794c07e7d4e078be361903970981752
parent959802d73e42904fc1fa3b2e35b7d49c74a36220 (diff)
downloadvaadin-framework-c93035c9812b33718195c829a7231347e095b549.tar.gz
vaadin-framework-c93035c9812b33718195c829a7231347e095b549.zip
Test which embeds two UIs on the same page (#9619)
-rw-r--r--WebContent/WEB-INF/web.xml25
-rwxr-xr-xWebContent/statictestfiles/embed-two-uis.html93
2 files changed, 118 insertions, 0 deletions
diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml
index 70c875b10c..d752b8eb33 100644
--- a/WebContent/WEB-INF/web.xml
+++ b/WebContent/WEB-INF/web.xml
@@ -14,6 +14,22 @@
<param-value>false</param-value>
<description>Vaadin production mode</description>
</context-param>
+ <servlet>
+ <servlet-name>Embed App 1</servlet-name>
+ <servlet-class>com.vaadin.server.LegacyVaadinServlet</servlet-class>
+ <init-param>
+ <param-name>application</param-name>
+ <param-value>com.vaadin.tests.components.absolutelayout.AbsoluteLayoutClipping</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>Embed App 2</servlet-name>
+ <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
+ <init-param>
+ <param-name>ui</param-name>
+ <param-value>com.vaadin.tests.components.label.MarginsInLabels</param-value>
+ </init-param>
+ </servlet>
<context-param>
<param-name>resourceCacheTime</param-name>
@@ -34,8 +50,17 @@
<param-value>com.vaadin.tests.integration.IntegrationTestApplication</param-value>
</init-param>
</servlet>
+ <servlet-mapping>
+ <servlet-name>Embed App 1</servlet-name>
+ <url-pattern>/embed1/*</url-pattern>
+ </servlet-mapping>
<servlet-mapping>
+ <servlet-name>Embed App 2</servlet-name>
+ <url-pattern>/embed2/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
<servlet-name>VaadinApplicationRunner</servlet-name>
<url-pattern>/run/*</url-pattern>
</servlet-mapping>
diff --git a/WebContent/statictestfiles/embed-two-uis.html b/WebContent/statictestfiles/embed-two-uis.html
new file mode 100755
index 0000000000..62dff7d8d0
--- /dev/null
+++ b/WebContent/statictestfiles/embed-two-uis.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="chrome=1" />
+<title>com.vaadin.tests.components.embedded.EmbeddedPdf</title>
+<style type="text/css">
+html,body {
+ height: 100%;
+ margin: 0;
+}
+</style>
+<link rel="shortcut icon" type="image/vnd.microsoft.icon"
+ href="/VAADIN/themes/reindeer/favicon.ico" />
+<link rel="icon" type="image/vnd.microsoft.icon"
+ href="/VAADIN/themes/reindeer/favicon.ico" />
+
+<script type="text/javascript" src="/VAADIN/vaadinBootstrap.js"></script>
+</head>
+<body scroll="auto" class=" v-generated-body">
+ <span>Embed 1 (AbsoluteLayoutClipping)</span>
+ <div style="width: 300px; height: 300px; border: 1px solid red;"
+ id="app1" class=" v-app v-app-VaadinServletSession">
+ <div class=" v-app-loading"></div>
+ <noscript>You have to enable javascript in your browser to
+ use an application built with Vaadin.</noscript>
+ </div>
+ <iframe tabindex="-1" id="__gwt_historyFrame"
+ style="position: absolute; width: 0; height: 0; border: 0; overflow: hidden"
+ src="javascript:false"></iframe>
+ <script type="text/javascript">
+ //
+ if (!window.vaadin)
+ alert("Failed to load the bootstrap javascript: /VAADIN/vaadinBootstrap.js");
+ vaadin
+ .setDefaults({
+ "appUri" : "/",
+ "authErrMsg" : {
+ "caption" : "Authentication problem",
+ "message" : "Take note of any unsaved data, and <u>click here<\/u>tagtagtag to continue."
+ },
+ "comErrMsg" : {
+ "caption" : "Communication problem",
+ "message" : "Take note of any unsaved data, and _$t_$tag_$ere<\k here_$t_$tag_$t_$tag to continue."
+ },
+ "debug" : true,
+ "heartbeatInterval" : 300,
+ "standalone" : true,
+ "widgetsetBase" : "/VAADIN/widgetsets/"
+ });
+ </script>
+
+ </script>
+ <script type="text/javascript">
+ //
+ vaadin.initApplication("app1", {
+ "appUri" : "/embed1",
+ "initialParams" : {},
+ "initialPath" : "",
+ "themeUri" : "/VAADIN/themes/reindeer",
+ "versionInfo" : {
+ "vaadinVersion" : "9.9.9.INTERNAL-DEBUG-BUILD"
+ },
+ "widgetset" : "com.vaadin.DefaultWidgetSet"
+ });
+ //
+ </script>
+ <span>Embed 2 (MarginsInLabels)</span>
+ <div style="width: 300px; height: 300px; border: 1px solid blue;"
+ id="app2" class=" v-app v-app-VaadinServletSession">
+ <div class="v-app-loading"></div>
+ <noscript>You have to enable javascript in your browser to
+ use an application built with Vaadin.</noscript>
+ </div>
+ <iframe tabindex="-1" id="__gwt_historyFrame"
+ style="position: absolute; width: 0; height: 0; border: 0; overflow: hidden"
+ src="javascript:false"></iframe>
+ <script type="text/javascript">
+ vaadin.initApplication("app2", {
+ "appUri" : "/embed2",
+ "initialParams" : {},
+ "initialPath" : "/",
+ "themeUri" : "/VAADIN/themes/reindeer",
+ "versionInfo" : {
+ "vaadinVersion" : "9.9.9.INTERNAL-DEBUG-BUILD"
+ },
+ "widgetset" : "com.vaadin.DefaultWidgetSet"
+ });
+ //
+ </script>
+
+</body>
+</html> \ No newline at end of file