summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-08-25 14:18:46 +0300
committerHenri Sara <hesara@vaadin.com>2015-08-31 16:40:41 +0300
commit81be262f0f0596972c4838833a4544392960d974 (patch)
tree8d02bd1b731246a4828ea555e18b4587c6675bfd /uitest
parent4665f13c0cbc548b167f03460c3ecd01f5999f3e (diff)
downloadvaadin-framework-81be262f0f0596972c4838833a4544392960d974.tar.gz
vaadin-framework-81be262f0f0596972c4838833a4544392960d974.zip
Do not include Chrome version in test output
Change-Id: I52c1adaa140f8ac213283efd037f3a9736b48f6b
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/integration/JSR286Portlet.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/integration/JSR286Portlet.java b/uitest/src/com/vaadin/tests/integration/JSR286Portlet.java
index 37f8e21c50..3fbf5b57ef 100644
--- a/uitest/src/com/vaadin/tests/integration/JSR286Portlet.java
+++ b/uitest/src/com/vaadin/tests/integration/JSR286Portlet.java
@@ -110,10 +110,16 @@ public class JSR286Portlet extends UI {
}
private void possiblyChangedModeOrState() {
- VaadinPortletRequest request = (VaadinPortletRequest) VaadinPortletService
- .getCurrentRequest();
-
- userAgent.setValue(getPage().getWebBrowser().getBrowserApplication());
+ VaadinPortletRequest request = VaadinPortletService.getCurrentRequest();
+
+ String censoredUserAgent = getPage().getWebBrowser()
+ .getBrowserApplication();
+ if (censoredUserAgent.contains("Chrome/")) {
+ // Censor version info as it tends to change
+ censoredUserAgent = censoredUserAgent.replaceAll("Chrome/[^ ]* ",
+ "Chrome/xyz ");
+ }
+ userAgent.setValue(censoredUserAgent);
screenWidth.setValue(String.valueOf(getPage().getBrowserWindowWidth()));
screenHeight.setValue(String
.valueOf(getPage().getBrowserWindowHeight()));