[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit WebWindowTest.java,1.3,1.4
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-02-05 16:07:44
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv7415/test/com/meterware/httpunit
Modified Files:
WebWindowTest.java
Log Message:
Check for HTML before trying to run scripts in new window
Index: WebWindowTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebWindowTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WebWindowTest.java 11 Oct 2002 01:26:22 -0000 1.3
+++ WebWindowTest.java 5 Feb 2003 16:07:40 -0000 1.4
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
- * Copyright (c) 2002, Russell Gold
+ * Copyright (c) 2002-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -27,7 +27,7 @@
/**
*
- * @author <a href="mailto:rus...@ac...">Russell Gold</a>
+ * @author <a href="mailto:rus...@ht...">Russell Gold</a>
**/
public class WebWindowTest extends HttpUnitTest {
@@ -112,7 +112,7 @@
public void testWindowIndependence() throws Exception {
- defineResource( "next", "You made it!" );
+ defineResource( "next", "You made it!", "text/plain" );
defineWebPage( "goHere", "<a href='next' id=proceed>more</a>" );
defineWebPage( "start", "<a href='goHere.html' id='go' target='_blank'>here</a>" );
@@ -121,7 +121,7 @@
WebResponse initialPage = wc.getResponse( getHostPath() + "/start.html" );
initialPage.getLinkWithID( "go" ).click();
WebWindow other = wc.getOpenWindows()[1];
- WebResponse response = other.getResponse( other.getCurrentPage().getLinkWithID( "proceed" ).getRequest() );
+ other.getResponse( other.getCurrentPage().getLinkWithID( "proceed" ).getRequest() );
assertEquals( "Main page URL", getHostPath() + "/start.html", main.getCurrentPage().getURL().toExternalForm() );
assertEquals( "New window contents", "You made it!", other.getCurrentPage().getText() );
}
@@ -133,7 +133,7 @@
defineWebPage( "start", "<a href='goHere.html' id='go' target='_blank'>here</a>" );
WebClient wc = new WebConversation();
- WebWindow main = wc.getMainWindow();
+ wc.getMainWindow();
WebResponse initialPage = wc.getResponse( getHostPath() + "/start.html" );
initialPage.getLinkWithID( "go" ).click();
WebWindow other = wc.getOpenWindows()[1];
|