diff options
author | Artur Signell <artur@vaadin.com> | 2015-08-25 14:18:46 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-08-26 11:45:42 +0000 |
commit | 71e8630e00a7f70885e26c47426c42e395992fe1 (patch) | |
tree | 28b8dcd34fb7e13a16d471cf3a568d498f5b91ef /uitest | |
parent | 1cef2d2f428ee1555c8b933314582b16112941bd (diff) | |
download | vaadin-framework-71e8630e00a7f70885e26c47426c42e395992fe1.tar.gz vaadin-framework-71e8630e00a7f70885e26c47426c42e395992fe1.zip |
Do not include Chrome version in test output
Change-Id: I885ca2fb0d7ef23385107cdf700bb0b5d25e8d8a
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/integration/JSR286Portlet.java | 14 |
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())); |