gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/XMLS...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/XMLS...
Date: Tue, 03 Apr 2007 14:07:22 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/03 14:07:22

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: XMLSocket.as 

Log message:
                * testsuite/actionscript.all/XMLSocket.as: some more
                  testing.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2762&r2=1.2763
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XMLSocket.as?cvsroot=gnash&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2762
retrieving revision 1.2763
diff -u -b -r1.2762 -r1.2763
--- ChangeLog   3 Apr 2007 13:43:32 -0000       1.2762
+++ ChangeLog   3 Apr 2007 14:07:21 -0000       1.2763
@@ -1,5 +1,7 @@
 2007-04-03 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/XMLSocket.as: some more
+         testing.
        * server/sprite_instance.{cpp,h}: split the
          DisplayList reset code from execute_frame_tags()
          to a resetDisplayList() method.

Index: testsuite/actionscript.all/XMLSocket.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/XMLSocket.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/actionscript.all/XMLSocket.as     30 Mar 2007 14:51:38 -0000      
1.1
+++ testsuite/actionscript.all/XMLSocket.as     3 Apr 2007 14:07:22 -0000       
1.2
@@ -20,7 +20,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: XMLSocket.as,v 1.1 2007/03/30 14:51:38 strk Exp $";
+rcsid="$Id: XMLSocket.as,v 1.2 2007/04/03 14:07:22 strk Exp $";
 
 #include "check.as"
 
@@ -49,3 +49,56 @@
 check( ! socketObj.hasOwnProperty('connect') );
 check( ! socketObj.hasOwnProperty('close') );
 check( ! socketObj.hasOwnProperty('send') );
+
+socketObj.secret = 4;
+
+socketObj.onConnect = function(success) {
+       check_equals(this.secret, 4);
+       if ( success )
+       {
+               note("XMLSocket.onConnect(success) called");
+       }
+       else
+       {
+               note("XMLSocket.onConnect(failure) called");
+       }
+};
+
+socketObj.onData = function(src) {
+       check_equals(this.secret, 4);
+       note("XMLSocket.onData("+src+") called with "+arguments.length);
+};
+
+socketObj.onClose = function() {
+       check_equals(this.secret, 4);
+       note("XMLSocket.onClose() called with "+arguments.length);
+};
+
+host = 'localhost';
+port = 3660;
+ret = socketObj.connect(host, port);
+if (ret) {
+       note("XMLSocket.connect("+host+", "+port+") returned true");
+} else {
+       note("XMLSocket.connect("+host+", "+port+") returned false");
+}
+
+#if 0 // disabled reconnect to avoid closing the socket prematurely
+host = null;
+port = 3660;
+ret = socketObj.connect(host, port);
+if (ret) {
+       note("XMLSocket.connect("+host+", "+port+") returned true");
+} else {
+       note("XMLSocket.connect("+host+", "+port+") returned false");
+}
+
+host = 'localhost';
+port = 3661;
+ret = socketObj.connect(host, port);
+if (ret) {
+       note("XMLSocket.connect("+host+", "+port+") returned true");
+} else {
+       note("XMLSocket.connect("+host+", "+port+") returned false");
+}
+#endif




reply via email to

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