gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11403: Fix NetConnection.connect pr


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11403: Fix NetConnection.connect properly so it runs potlatch and passes the remoting
Date: Tue, 25 Aug 2009 18:50:42 -0000
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11403 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-08-10 13:59:03 +0200
message:
  Fix NetConnection.connect properly so it runs potlatch and passes the remoting
  tests. Change NetConnection.as so that it doesn't ruin the remaining tests
  by attempting a sandbox-restricted connection. Note lack of tests for
  genuine connections.
modified:
  libcore/asobj/NetConnection_as.cpp
  testsuite/actionscript.all/NetConnection.as
=== modified file 'libcore/asobj/NetConnection_as.cpp'
--- a/libcore/asobj/NetConnection_as.cpp        2009-08-10 08:58:18 +0000
+++ b/libcore/asobj/NetConnection_as.cpp        2009-08-10 11:39:25 +0000
@@ -847,10 +847,11 @@
     URL url(uri, getRunResources(*this).baseURL());
 
     if ((url.protocol() != "rtmp")
-       || (url.protocol() != "rtmpt")
-       || (url.protocol() != "rtmpts")
-       || (url.protocol() != "https")
-       || (url.protocol() != "http")) {
+        && (url.protocol() != "rtmpt")
+        && (url.protocol() != "rtmpts")
+        && (url.protocol() != "https")
+        && (url.protocol() != "http")) {
+
         IF_VERBOSE_ASCODING_ERRORS(
                 log_aserror("NetConnection.connect(%s): invalid connection "
                             "protocol", url);

=== modified file 'testsuite/actionscript.all/NetConnection.as'
--- a/testsuite/actionscript.all/NetConnection.as       2009-02-25 22:33:03 
+0000
+++ b/testsuite/actionscript.all/NetConnection.as       2009-08-10 11:37:29 
+0000
@@ -59,6 +59,13 @@
 tmp.isConnected = 56;
 check_equals(tmp.isConnected, false);
 
+#if 0
+// Provided this connection is allowed, the player creates a connection.
+// Because the Adobe player has a different sandbox method from Gnash,
+// we can't test this connection *and* the blacklisted one.
+
+// Starting this connection also causes different results later.
+
 // test the NetConnection::connect method
 if ( ! 
tmp.connect("rtmp://www.mediacollege.com/flash/media-player/testclip-4sec.flv") 
)
 {
@@ -69,6 +76,7 @@
 {
        pass("NetConnection::connect() initialized correctly");
 }
+#endif
 
 statuses = new Array;
 tmp.onStatus = function(info) {
@@ -80,12 +88,15 @@
 result = "";
 level = "";
 
+statuses = new Array();
 ret = tmp.connect();
 check_equals(ret, undefined);
 check_equals(tmp.isConnected, false);
 check_equals(result, "");
 check_equals(level, "");
+check_equals(statuses.toString(), "");
 
+statuses = new Array();
 ret = tmp.connect("");
 check_equals(ret, false);
 check_equals(tmp.isConnected, false);
@@ -93,6 +104,7 @@
 check_equals(level, "error");
 check_equals(typeof(tmp.uri), "string");
 check_equals(tmp.uri, "");
+check_equals(statuses.toString(), "NetConnection.Connect.Failed");
 
 ret = tmp.connect("null");
 check_equals(ret, false);
@@ -184,7 +196,8 @@
 check_equals(level, "error");
 
 
-// Close() doesn't reset uri
+// Close() doesn't reset uri if no connection is made. It does seem to
+// reset it if a connection is genuinely closed.
 tmp.close();
 check_equals(tmp.uri, "http://www.blacklistedserver.org";);
 
@@ -290,7 +303,7 @@
 check_equals(result, "NetConnection.Connect.Failed");
 check_equals(level, "error");
 
-check_totals(119);
+check_totals(120);
 
 
 


reply via email to

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