BrowserResult result = build(request, aware);
aware.setBrowserResult(result);
}
public BrowserResult build(HttpServletRequest request, BrowserSource source) {
BrowserResult result = new BrowserResult();
String testId = request.getParameter(BrowserResultWriter.ID);
if (!StringUtility.isEmpty(testId))
result.setId(testId);
result.setRemoteAddress(request.getRemoteAddr());
result.setUserAgent(request.getParameter(BrowserResultWriter.USER_AGENT));
result.setBaseURL(request.getParameter(BrowserResultWriter.URL));
String time = request.getParameter(BrowserResultWriter.TIME);
if (!StringUtility.isEmpty(time))
result.setTime(Double.parseDouble(time));
result.setJsUnitVersion(request.getParameter(BrowserResultWriter.JSUNIT_VERSION));
result._setTestCaseStrings(request.getParameterValues(BrowserResultWriter.TEST_CASE_RESULTS));
String browserIdString = request.getParameter("browserId");
if (browserIdString != null)
result.setBrowser(source.getBrowserById(Integer.parseInt(browserIdString)));
String userProperty = request.getParameter(BrowserResultWriter.USER_PROPERTY);
if (userProperty != null)
result.setUserProperty(userProperty);
return result;
}