diff options
author | Joonas Lehtinen <joonas@vaadin.com> | 2013-06-28 18:19:47 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-07-09 12:23:48 +0000 |
commit | 104e472d21e92c3023abc4cfe96e67861424927c (patch) | |
tree | ee0b4d6844f7d7acab7378180877556c2a0b224c /uitest/src | |
parent | 02692163274392fe1b0a33a5206390df0824703d (diff) | |
download | vaadin-framework-104e472d21e92c3023abc4cfe96e67861424927c.tar.gz vaadin-framework-104e472d21e92c3023abc4cfe96e67861424927c.zip |
Fixes @PreserveOnRefresh losing page title on refresh #11054
Moves Page title to PageState instead of using RPC for changing the title on Page.setTitle().
Change-Id: I8e5ab2064c04235503fb2531f4cdbb108530ac7e
Diffstat (limited to 'uitest/src')
-rw-r--r-- | uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html | 36 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.java | 30 |
2 files changed, 66 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html b/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html new file mode 100644 index 0000000000..f366054f45 --- /dev/null +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.html @@ -0,0 +1,36 @@ +<?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:8888/run/com.vaadin.tests.application.RefreshStatePreserveTitle?restartApplication" /> +<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.application.RefreshStatePreserveTitle?restartApplication</td> + <td></td> +</tr> +<tr> + <td>assertTitle</td> + <td>TEST</td> + <td></td> +</tr> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.application.RefreshStatePreserveTitle</td> + <td></td> +</tr> +<tr> + <td>assertTitle</td> + <td>TEST</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.java b/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.java new file mode 100644 index 0000000000..88b3a9b9f4 --- /dev/null +++ b/uitest/src/com/vaadin/tests/application/RefreshStatePreserveTitle.java @@ -0,0 +1,30 @@ +package com.vaadin.tests.application; + +import com.vaadin.annotations.PreserveOnRefresh; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.tests.util.Log; +import com.vaadin.ui.Label; + +@PreserveOnRefresh +public class RefreshStatePreserveTitle extends AbstractTestUI { + + private Log log = new Log(5); + + @Override + protected void setup(VaadinRequest request) { + getPage().setTitle("TEST"); + addComponent(new Label( + "Refresh the page and observe that window title 'TEST' is lost.")); + } + + @Override + protected String getTestDescription() { + return "Refreshing the browser window should preserve the window title"; + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(11054); + } +}
\ No newline at end of file |