Update of /cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11815/fitplugin/src/net/sourceforge/jwebunit/fit
Modified Files:
WebFixture.java
Log Message:
Added actions loggingHttpHeaders() and cookieMatchingStrict to control and
debug HttpUnit cookie handling.
Index: WebFixture.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/fitplugin/src/net/sourceforge/jwebunit/fit/WebFixture.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** WebFixture.java 15 May 2005 20:16:16 -0000 1.23
--- WebFixture.java 4 Dec 2005 21:04:11 -0000 1.24
***************
*** 6,9 ****
--- 6,12 ----
import java.util.List;
+ import com.meterware.httpunit.cookies.CookieListener;
+ import com.meterware.httpunit.cookies.CookieProperties;
+
import junit.framework.AssertionFailedError;
import net.sourceforge.jwebunit.WebTester;
***************
*** 56,59 ****
--- 59,78 ----
}
+ public void setLoggingHttpHeaders(boolean flag) {
+ com.meterware.httpunit.HttpUnitOptions.setLoggingHttpHeaders(flag);
+ if (flag) {
+ CookieProperties.addCookieListener(new CookieListener() {
+ public void cookieRejected(String arg0, int
arg1, String arg2) {
+ System.out.println("cookieRejected: " +
arg0 + " " + arg1 + " " + arg2);
+ }
+ });
+ }
+ }
+
+ public void setCookieMatchingStrict(boolean flag) {
+ CookieProperties.setDomainMatchingStrict(false);
+ CookieProperties.setPathMatchingStrict(false);
+ }
+
// Actions
public void exceptionsThrownOnScriptError() {
***************
*** 61,64 ****
--- 80,91 ----
}
+ public void loggingHttpHeaders() {
+ setLoggingHttpHeaders("true".equalsIgnoreCase(cells.more.text()));
+ }
+
+ public void cookieMatchingStrict() {
+ setCookieMatchingStrict("true".equalsIgnoreCase(cells.more.text()));
+ }
+
public void baseUrl() {
setBaseUrl(cells.more.text());
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development