diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-11-01 13:12:07 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-01 12:04:37 +0000 |
commit | dbf982bb3b3ddccba00fbc889a0130feac2a6d2d (patch) | |
tree | 7a573a3241058ee4114bd4d6b1677c9ed4b20560 /uitest/src | |
parent | 008b582c66166b1a2e7ada4510e3a3d8be433a10 (diff) | |
download | vaadin-framework-dbf982bb3b3ddccba00fbc889a0130feac2a6d2d.tar.gz vaadin-framework-dbf982bb3b3ddccba00fbc889a0130feac2a6d2d.zip |
Fix client-side NPE in Image without a source (#10101)
Change-Id: I7911dffd8700dc166f7b8669d291a0e34cb43daf
Diffstat (limited to 'uitest/src')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html | 27 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.java | 48 |
2 files changed, 75 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html b/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html new file mode 100644 index 0000000000..37186bd901 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.html @@ -0,0 +1,27 @@ +<?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>EmbeddedWithNullSource</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">EmbeddedWithNullSource</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/EmbeddedWithNullSource?restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.java b/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.java new file mode 100644 index 0000000000..e6b51399e9 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/abstractembedded/EmbeddedWithNullSource.java @@ -0,0 +1,48 @@ +package com.vaadin.tests.components.abstractembedded; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.AbstractEmbedded; +import com.vaadin.ui.BrowserFrame; +import com.vaadin.ui.Flash; +import com.vaadin.ui.Image; + +public class EmbeddedWithNullSource extends TestBase { + + @Override + protected void setup() { + AbstractEmbedded e; + + e = new Image("Image w/o alt text"); + addComponent(e); + + e = new Image("Image w/ alt text"); + e.setAlternateText("Image"); + addComponent(e); + + e = new Flash("Flash w/o alt text"); + addComponent(e); + + e = new Flash("Flash w/ alt text"); + e.setAlternateText("Flash"); + addComponent(e); + + e = new BrowserFrame("BrowserFrame w/o alt text"); + addComponent(e); + + e = new BrowserFrame("BrowserFrame w/ alt text"); + e.setAlternateText("BrowserFrame"); + addComponent(e); + + } + + @Override + protected String getDescription() { + return "Image without a source causes a client-side NPE"; + } + + @Override + protected Integer getTicketNumber() { + return 10101; + } + +} |