aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/image/ImageAltText.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/image/ImageAltText.java')
-rw-r--r--uitest/src/com/vaadin/tests/components/image/ImageAltText.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/image/ImageAltText.java b/uitest/src/com/vaadin/tests/components/image/ImageAltText.java
new file mode 100644
index 0000000000..6abbc41213
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/image/ImageAltText.java
@@ -0,0 +1,38 @@
+package com.vaadin.tests.components.image;
+
+import com.vaadin.server.ThemeResource;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Image;
+
+public class ImageAltText extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Image image = new Image("Caption", new ThemeResource(
+ "../runo/icons/64/ok.png"));
+ image.setDebugId("image");
+ image.setAlternateText("Original alt text");
+ addComponent(image);
+
+ Button changeAltTexts = new Button("Change alt text",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ image.setAlternateText("New alt text!");
+ }
+ });
+ addComponent(changeAltTexts);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Test alternative text of image";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return null;
+ }
+
+}