diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-01-18 17:31:29 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-01-18 17:31:29 +0000 |
commit | 23260c35e007fa501ceb3cf87d8d09782d7516ae (patch) | |
tree | 9cf7a538a0dd2efb4f06bd3e83035d6c128c62e5 | |
parent | 39b230208e346f66d68715e15cc2cf327e89a0d2 (diff) | |
download | vaadin-framework-23260c35e007fa501ceb3cf87d8d09782d7516ae.tar.gz vaadin-framework-23260c35e007fa501ceb3cf87d8d09782d7516ae.zip |
Test for #6304
svn changeset:16942/svn branch:6.5
-rw-r--r-- | tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html | 37 | ||||
-rw-r--r-- | tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java | 40 |
2 files changed, 77 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html b/tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html new file mode 100644 index 0000000000..268d3074f7 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.html @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="" /> +<title>New Test</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">New Test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.customcomponent.EmbeddedInCustomComponent?restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>initial</td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.customcomponent.EmbeddedInCustomComponent?restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>after-refresh</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java b/tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java new file mode 100644 index 0000000000..8a37d85b31 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/customcomponent/EmbeddedInCustomComponent.java @@ -0,0 +1,40 @@ +package com.vaadin.tests.components.customcomponent; + +import java.util.Date; + +import com.vaadin.terminal.ThemeResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.CustomComponent; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.HorizontalLayout; + +public class EmbeddedInCustomComponent extends TestBase { + + @Override + protected void setup() { + HorizontalLayout hl = new HorizontalLayout(); + + hl.addComponent(wrap("An uncached image", + "ok.png?random=" + new Date().getTime())); + hl.addComponent(wrap("A cached image", "cancel.png")); + addComponent(hl); + } + + private CustomComponent wrap(String caption, String themeImage) { + Embedded image = new Embedded(caption, new ThemeResource( + "../runo/icons/64/" + themeImage)); + CustomComponent cc = new CustomComponent(image); + return cc; + } + + @Override + protected String getDescription() { + return "Two embedded images are shown below, side-by-side. The first one has a random url so it is not cached, the second one is cached."; + } + + @Override + protected Integer getTicketNumber() { + return 6304; + } + +} |