From: Marc Englund Date: Fri, 15 Feb 2008 11:00:33 +0000 (+0000) Subject: Does not write TestingTools TestCase script anymore - fetched directly from server. X-Git-Tag: 6.7.0.beta1~5041 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f0ce47e114b9d623c8f7383ff8e2028fd82e0b8a;p=vaadin-framework.git Does not write TestingTools TestCase script anymore - fetched directly from server. svn changeset:3808/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java index 57cdabdbb6..14872e3116 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java @@ -14,7 +14,6 @@ import java.io.Writer; import java.lang.reflect.Constructor; import java.net.MalformedURLException; import java.net.URL; -import java.net.URLConnection; import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; @@ -682,6 +681,8 @@ public class ApplicationServlet extends HttpServlet { boolean testingWindow = testingToolsActive && request.getParameter("TT") != null; + // TODO simplify if possible (probably) + page.write("', pathInfo: '" + pathInfo); page.write("', themeUri: "); page.write(themeUri != null ? "'" + themeUri + "'" : "null"); @@ -733,13 +734,7 @@ public class ApplicationServlet extends HttpServlet { + "\" type=\"text/javascript\">\n"); page.write("\n"); - if (request.getParameter("TT-TC") != null - || request.getParameter("TT-TS") != null) { - proxyTestCases(request.getParameter("TT-TC"), request - .getParameter("TT-TS"), request - .getParameter("TT-TS-RUN-ID"), page, - getTestingToolsUri(request)); - } + } private String getTestingToolsUri(HttpServletRequest request) { @@ -752,60 +747,6 @@ public class ApplicationServlet extends HttpServlet { return testingToolsServerUri; } - /** - * Fetches testcase or testsuite scripts from Testing Tools server and - * injects script to AUT client - * - * @param testCaseId - * @param testSuiteId - * @param testSuiteRunId - * @param page - * @param testServerUri - * @throws IOException - * @throws MalformedURLException - */ - private void proxyTestCases(String testCaseId, String testSuiteId, - String testSuiteRunId, Writer page, String testServerUri) - throws IOException, MalformedURLException { - URLConnection conn; - - if (testCaseId != null) { - testServerUri += "/TT-TC/" + testCaseId; - } - if (testSuiteId != null) { - testServerUri += "/TT-TS/" + testSuiteId; - } - if (testSuiteRunId != null) { - testServerUri += "/TT-TS-RUN-ID/" + testSuiteRunId; - } - - conn = new URL(testServerUri).openConnection(); - InputStream is = conn.getInputStream(); - - StringBuffer builder = new StringBuffer(); - byte[] b = new byte[4096]; - for (int n; (n = is.read(b)) != -1;) { - builder.append(new String(b, 0, n)); - } - is.close(); - - if (builder != null && builder.length() > 0) { - page - .write("\n"); - } - } - /** * Handles the requested URI. An application can add handlers to do special * processing, when a certain URI is requested. The handlers are invoked