gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/asobj/NetConnection.cpp ...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetConnection.cpp ...
Date: Wed, 26 Dec 2007 20:30:14 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/26 20:30:14

Modified files:
        .              : ChangeLog 
        server/asobj   : NetConnection.cpp 
        testsuite/actionscript.all: NetConnection.as 

Log message:
        Implement NetConnection.isConnected and a first cleanup pass on the 
testcase
        (lots to be done still)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5263&r2=1.5264
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/NetConnection.as?cvsroot=gnash&r1=1.12&r2=1.13

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5263
retrieving revision 1.5264
diff -u -b -r1.5263 -r1.5264
--- ChangeLog   26 Dec 2007 18:03:46 -0000      1.5263
+++ ChangeLog   26 Dec 2007 20:30:13 -0000      1.5264
@@ -1,5 +1,11 @@
 2007-12-26 Sandro Santilli <address@hidden>
 
+       * server/asobj/NetConnection.cpp: implement NetConnection.isConnected
+       * testsuite/actionscript.all/NetConnection.as: first pass of cleanup,
+         lots to be done still...
+
+2007-12-26 Sandro Santilli <address@hidden>
+
        * libbase/rc.{cpp,h}: add support for an urlOpenerFormat directive.
        * server/vm/ASHandlers.cpp (CommonGetUrl): use new
          RcInitFile::geURLOpenerFormat() method to obtain command to

Index: server/asobj/NetConnection.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- server/asobj/NetConnection.cpp      20 Nov 2007 00:44:04 -0000      1.51
+++ server/asobj/NetConnection.cpp      26 Dec 2007 20:30:14 -0000      1.52
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: NetConnection.cpp,v 1.51 2007/11/20 00:44:04 cmusick Exp $ */
+/* $Id: NetConnection.cpp,v 1.52 2007/12/26 20:30:14 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -289,12 +289,16 @@
 
        if ( fn.nargs == 0 ) // getter
        {
-               log_unimpl("NetConnection.isConnected get");
-               return as_value();
+               // TODO: define a NetConnection::isConnected method
+               return as_value((bool)ptr->_loader.get());
+               //log_unimpl("NetConnection.isConnected get");
+               //return as_value();
        }
        else // setter
        {
-               log_unimpl("NetConnection.isConnected set");
+               IF_VERBOSE_ASCODING_ERRORS(
+               log_aserror("Tried to set read-only property 
NetConnection.isConnected");
+               );
                return as_value();
        }
 }

Index: testsuite/actionscript.all/NetConnection.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/NetConnection.as,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- testsuite/actionscript.all/NetConnection.as 29 Sep 2007 16:22:58 -0000      
1.12
+++ testsuite/actionscript.all/NetConnection.as 26 Dec 2007 20:30:14 -0000      
1.13
@@ -26,27 +26,25 @@
 
 #else // OUTPUT_VERSION >= 7
 
-var tmp = new NetConnection;
-
-
-// test the NetConnection constuctor
-if (tmp) {
-    pass("NetConnection::NetConnection() constructor");
-} else {
-    fail("NetConnection::NetConnection()");            
-}
+check_equals(typeof(NetConnection), 'function');
+check_equals(typeof(NetConnection.prototype), 'object');
+check_equals(typeof(NetConnection.prototype.isConnected), 'undefined');
+check_equals(typeof(NetConnection.prototype.connect), 'function');
+// TODO: add tests for all interfaces
 
-// test the NetConnection::connect method
-if (tmp.connect) {
-    pass("NetConnection::connect() exists");
-} else {
-    fail("NetConnection::connect() doesn't exist");
-}
+var tmp = new NetConnection;
+check_equals(typeof(tmp), 'object');
+check_equals(tmp.__proto__, NetConnection.prototype);
+check(tmp instanceof NetConnection);
+check_equals(typeof(tmp.isConnected), 'boolean');
+check_equals(tmp.isConnected, false);
+// TODO: add tests for all properties
 
 // test the NetConnection::connect method
 tmp.connect();
 if ( ! 
tmp.connect("rtmp://www.mediacollege.com/flash/media-player/testclip-4sec.flv") 
)
 {
+       // FIXME: this would fail in the reference player too...
        xfail("NetConnection::connect() didn't initialized correctly");
 }
 else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]