--- /dev/null
+<?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="http://localhost:8068" />
+<title>EmbeddedAltText</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">EmbeddedAltText</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.embedded.EmbeddedAltText?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertAttribute</td>
+ <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedAltText::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VEmbedded[0]/domChild[0]@alt</td>
+ <td>Alt text of the image</td>
+</tr>
+<tr>
+ <td>assertHtmlSource</td>
+ <td>*Alt text of the object*</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedAltText::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertAttribute</td>
+ <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedAltText::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VEmbedded[0]/domChild[0]@alt</td>
+ <td>New alt text of the image!</td>
+</tr>
+<tr>
+ <td>assertHtmlSource</td>
+ <td>*New alt text of the object!*</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
--- /dev/null
+package com.vaadin.tests.components.embedded;
+
+import com.vaadin.terminal.ExternalResource;
+import com.vaadin.terminal.ThemeResource;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Embedded;
+
+public class EmbeddedAltText extends TestBase {
+ @Override
+ protected String getDescription() {
+ return "It should be possible to set an alternative text on an image or object.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 2853;
+ }
+
+ @Override
+ protected void setup() {
+ final Embedded e = new Embedded("Caption", new ThemeResource(
+ "../runo/icons/64/ok.png"));
+ e.setAlternateText("Alt text of the image");
+ addComponent(e);
+ final Embedded player = new Embedded();
+ player.setAlternateText("Alt text of the object");
+ player.setType(Embedded.TYPE_OBJECT);
+ player.setWidth("400px");
+ player.setHeight("300px");
+ player.setMimeType("application/x-shockwave-flash");
+ String url = "http://www.youtube.com/v/qQ9N742QB4g&autoplay=1";
+ player.setSource(new ExternalResource(url));
+ player.setParameter("movie", "someRandomValue");
+ player.setParameter("allowFullScreen", "true");
+ addComponent(player);
+
+ Button changeAltTexts = new Button("Change alt texts",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ e.setAlternateText("New alt text of the image!");
+ player.setAlternateText("New alt text of the object!");
+ }
+ });
+ addComponent(changeAltTexts);
+ }
+}