[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit/javascript ScriptingTest.java,1.44,1.45
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-11-19 04:57:21
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv11470/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
Fixed frame name array index and top.parent bug
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- ScriptingTest.java 13 Nov 2002 13:36:39 -0000 1.44
+++ ScriptingTest.java 19 Nov 2002 04:57:17 -0000 1.45
@@ -341,6 +341,9 @@
" alert( 'top url=' + window.top.location );" +
" alert( '1st frame=' + top.frames[0].name );" +
" alert( '2nd frame=' + window.parent.blue.name );" +
+ " alert( 'parent url=' + window.parent.location );" +
+ " alert( 'top.parent=' + top.parent.location );" +
+ " alert( 'indexed frame=' + top.frames['red'].name );" +
"}" +
"</script></head><body>" +
"<a href=# onclick='show_properties()'>show</a>" +
@@ -364,6 +367,9 @@
assertEquals( "2nd alert", "top url=" + getHostPath() + "/Frames.html", wc.popNextAlert() );
assertEquals( "3rd alert", "1st frame=red", wc.popNextAlert() );
assertEquals( "4th alert", "2nd frame=blue", wc.popNextAlert() );
+ assertEquals( "5th alert", "parent url=" + getHostPath() + "/Frames.html", wc.popNextAlert() );
+ assertEquals( "6th alert", "top.parent=" + getHostPath() + "/Frames.html", wc.popNextAlert() );
+ assertEquals( "7th alert", "indexed frame=red", wc.popNextAlert() );
}
|