[ajax4jsf-svn-commits] JBoss Ajax4JSF SVN: r81 - trunk/test/src/main/java/org/ajax4jsf/tests.

ajax4jsf-svn-commits at lists.jboss.org ajax4jsf-svn-commits at lists.jboss.org
Thu Apr 12 15:04:29 EDT 2007


Author: nbelaevski
Date: 2007-04-12 15:04:29 -0400 (Thu, 12 Apr 2007)
New Revision: 81

Modified:
   trunk/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
Log:
JavaScript disabled for WebClient as not treated prototype.js well producing kilometers stack traces. Method createWebClient() introduced to setup client if need

Modified: trunk/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
===================================================================
--- trunk/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java	2007-04-12 14:12:56 UTC (rev 80)
+++ trunk/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java	2007-04-12 19:04:29 UTC (rev 81)
@@ -183,13 +183,21 @@
 		}
 	}
 
+	protected WebClient createWebClient() {
+		WebClient client = new WebClient();
+		//disable javascript for now as HtmlUnit doesn't treat prototype.js well
+		client.setJavaScriptEnabled(false);
+
+		return client;
+	}
+	
 	/**
 	 * 
 	 */
 	protected void setupWebClient() {
 		ajaxContext = null;
 		// setup webClient for got response content.
-		webClient = new WebClient();
+		webClient = createWebClient();
 		webConnection = new MockWebConnection(webClient) {
 			public WebResponse getResponse(WebRequestSettings settings)
 			throws IOException {




More information about the ajax4jsf-svn-commits mailing list