Permalink
Browse files

JSFUNIT-275 Change to call closeAllWindows on SessionUnBound

git-svn-id: https://svn.jboss.org/repos/jsfunit/trunk@574 992343fe-802f-0410-85da-d31fbad5f0a6
  • Loading branch information...
1 parent dc06ac2 commit 8ebbb2b5913488266bd1f585b1da85b68bae8fa2 @aslakknutsen aslakknutsen committed Apr 5, 2011
Showing with 1 addition and 17 deletions.
  1. +1 −17 jboss-jsfunit-core/src/main/java/org/jboss/jsfunit/framework/WebClientSpec.java
@@ -291,23 +291,7 @@ public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent)
// as per HtmlUnit issue:
// https://sourceforge.net/tracker/?func=detail&atid=448266&aid=2014629&group_id=47038
// -----------------------------------------------------------------------------------
-
- // first get the top windows and then close them to avoid ConcurrentModificationException
- final List<TopLevelWindow> topWindows = new ArrayList<TopLevelWindow>();
- for (final Iterator<WebWindow> iter=webClient.getWebWindows().iterator();iter.hasNext();)
- {
- final WebWindow window = iter.next();
- if (window instanceof TopLevelWindow)
- {
- topWindows.add((TopLevelWindow)window);
- }
- }
- for (final Iterator<TopLevelWindow> iter=topWindows.iterator(); iter.hasNext();)
- {
- final TopLevelWindow window = iter.next();
- window.close();
- }
-
+ webClient.closeAllWindows();
}
public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent)

0 comments on commit 8ebbb2b

Please sign in to comment.