From 81be262f0f0596972c4838833a4544392960d974 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 25 Aug 2015 14:18:46 +0300 Subject: Do not include Chrome version in test output Change-Id: I52c1adaa140f8ac213283efd037f3a9736b48f6b --- uitest/src/com/vaadin/tests/integration/JSR286Portlet.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'uitest') 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())); -- cgit v1.2.3