[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit WebClient.java,1.52,1.53 WebResponse.java
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2004-02-12 05:41:08
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3036/src/com/meterware/httpunit Modified Files: WebClient.java WebResponse.java WebWindow.java Log Message: Do not replace main window on Window.open with null name Index: WebClient.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebClient.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- WebClient.java 20 Aug 2003 12:06:15 -0000 1.52 +++ WebClient.java 12 Feb 2004 05:36:29 -0000 1.53 @@ -2,7 +2,7 @@ /******************************************************************************************************************** * $Id$ * -* Copyright (c) 2000-2003, Russell Gold +* Copyright (c) 2000-2004, 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 @@ -45,10 +45,10 @@ abstract public class WebClient { + private ArrayList _openWindows = new ArrayList(); /** The current main window. **/ private WebWindow _mainWindow = new WebWindow( this ); - private ArrayList _openWindows = new ArrayList(); private String _authorizationString; Index: WebResponse.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v retrieving revision 1.123 retrieving revision 1.124 diff -u -r1.123 -r1.124 --- WebResponse.java 5 Dec 2003 04:06:53 -0000 1.123 +++ WebResponse.java 12 Feb 2004 05:36:29 -0000 1.124 @@ -2,7 +2,7 @@ /******************************************************************************************************************** * $Id$ * -* Copyright (c) 2000-2003, Russell Gold +* Copyright (c) 2000-2004, 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 @@ -668,7 +668,8 @@ public String getName() { - return getFrameName().equals( WebRequest.TOP_FRAME ) ? _window.getName() : getFrameName(); + String windowName = getFrameName().equals( WebRequest.TOP_FRAME ) ? _window.getName() : getFrameName(); + return windowName.startsWith( WebWindow.NO_NAME ) ? "" : windowName; } Index: WebWindow.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebWindow.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- WebWindow.java 5 Dec 2003 04:06:53 -0000 1.16 +++ WebWindow.java 12 Feb 2004 05:36:29 -0000 1.17 @@ -2,7 +2,7 @@ /******************************************************************************************************************** * $Id$ * - * Copyright (c) 2002-2003, Russell Gold + * Copyright (c) 2002-2004, 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 @@ -49,6 +49,9 @@ private boolean _closed; + static final String NO_NAME = "$$HttpUnit_Window$$_"; + + /** * Returns the web client associated with this window. */ @@ -216,6 +219,7 @@ WebWindow( WebClient client ) { _client = client; _frameContents = new FrameHolder( _client, WebRequest.TOP_FRAME ); + _name = NO_NAME + _client.getOpenWindows().length; } |