Revision: 699
          http://svn.sourceforge.net/jwebunit/?rev=699&view=rev
Author:   henryju
Date:     2007-05-05 11:23:33 -0700 (Sat, 05 May 2007)

Log Message:
-----------
[Issue 1706395] getPageSource() now returns source of the current frame or 
window.

Modified Paths:
--------------
    
branches/jwebunit-1.4.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
    
branches/jwebunit-1.4.x/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
    branches/jwebunit-1.4.x/src/changes/changes.xml

Modified: 
branches/jwebunit-1.4.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
===================================================================
--- 
branches/jwebunit-1.4.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
       2007-05-05 17:53:20 UTC (rev 698)
+++ 
branches/jwebunit-1.4.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
       2007-05-05 18:23:33 UTC (rev 699)
@@ -111,6 +111,14 @@
         assertException(RuntimeException.class, "gotoFrame",
                                new Object[] { "BottomFrame" });
        }
+    
+    public void testGetFrameSource() {
+        beginAt("Frames.html");
+        assertTrue(getPageSource().indexOf("<frameset rows=\"33%, 33%, 
33%\">")>=0);
+        gotoFrame("TopFrame");
+        assertEquals("<html><body>TopFrame</body></html>", getPageSource());
+        assertTextPresent("TopFrame");
+       }
 
        public void testGotoFrameById() {
         beginAt("Frames.html");

Modified: 
branches/jwebunit-1.4.x/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
===================================================================
--- 
branches/jwebunit-1.4.x/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
        2007-05-05 17:53:20 UTC (rev 698)
+++ 
branches/jwebunit-1.4.x/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitDialog.java
        2007-05-05 18:23:33 UTC (rev 699)
@@ -550,7 +550,7 @@
     }
     
     public String getPageSource() {
-        return wc.getCurrentWindow().getEnclosedPage().getWebResponse()
+        return win.getEnclosedPage().getWebResponse()
                 .getContentAsString();
     }
 

Modified: branches/jwebunit-1.4.x/src/changes/changes.xml
===================================================================
--- branches/jwebunit-1.4.x/src/changes/changes.xml     2007-05-05 17:53:20 UTC 
(rev 698)
+++ branches/jwebunit-1.4.x/src/changes/changes.xml     2007-05-05 18:23:33 UTC 
(rev 699)
@@ -8,6 +8,9 @@
     </properties>
     <body>
        <release version="1.4.1" date="UNKNOW">
+               <action type="fix" dev="Julien Henry" issue="1706395" 
due-to="meilon">
+                getPageSource() now returns source of the current frame or 
window.
+            </action>
                <action type="fix" dev="Julien Henry" 
issue="1708229,1710809,1712633" due-to="Jon,Joe Fisher">
                 setTextField now doesn't change the current working form if 
already set.
                 clickRadioOption now doesn't change the current working form 
if already set.


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to