gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11427: NetStream_as.hx does not fai


From: Sharad Desai
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11427: NetStream_as.hx does not fail in gnash or pp
Date: Fri, 14 Aug 2009 10:59:11 -0600
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11427 [merge]
committer: Sharad Desai <address@hidden>
branch nick: trunk
timestamp: Fri 2009-08-14 10:59:11 -0600
message:
  NetStream_as.hx does not fail in gnash or pp
modified:
  testsuite/misc-haxe.all/classes.all/net/NetStream_as.hx
=== modified file 'testsuite/misc-haxe.all/classes.all/net/NetStream_as.hx'
--- a/testsuite/misc-haxe.all/classes.all/net/NetStream_as.hx   2009-06-15 
20:00:09 +0000
+++ b/testsuite/misc-haxe.all/classes.all/net/NetStream_as.hx   2009-08-14 
16:58:22 +0000
@@ -28,10 +28,14 @@
 import flash.net.NetStream;
 import flash.display.MovieClip;
 import flash.media.SoundTransform;
+import flash.media.Video;
+import flash.events.NetStatusEvent;
+import flash.events.AsyncErrorEvent;
 #else
 import flash.NetStream;
 import flash.NetConnection;
 import flash.MovieClip;
+import flash.Video;
 #end
 import flash.Lib;
 import Type;
@@ -45,11 +49,20 @@
 #if !flash6
 #if !flash9
         var nc:NetConnection = new NetConnection();
+               nc.connect(null);
         var x1:NetStream = new NetStream(nc);
+               var my_video:Video = untyped Video.attachVideo(x1);
+               x1.play("test");
 #else
                var nc:NetConnection = new NetConnection();
                nc.connect(null);
                var x1:NetStream = new NetStream(nc);
+               x1.addEventListener(NetStatusEvent.NET_STATUS, function(e){ 
trace(e);});
+        x1.addEventListener(AsyncErrorEvent.ASYNC_ERROR, 
function(e){trace(e);});
+
+               var my_video:Video = new Video();
+               my_video.attachNetStream(x1);
+               x1.play("/home/sharad/Desktop/cubes.swf");
 #end
         // Make sure we actually get a valid class        
         if (Std.is(x1, NetStream)) {
@@ -57,194 +70,200 @@
         } else {
             DejaGnu.fail("NetStream class doesn't exist");
         }
-// Tests to see if all the properties exist. All these do is test for
-// existance of a property, and don't test the functionality at all. This
-// is primarily useful only to test completeness of the API implementation.
-       //FIXME: This read-only property must be initialized before it can be 
tested
-       if (Type.typeof(x1.bufferLength) == ValueType.TFloat) {
-           DejaGnu.xpass("NetStream.bufferLength property exists");
-       } else {
-           DejaGnu.xfail("NetStream.bufferLength property doesn't exist");
-       }
-       if (Type.typeof(x1.bufferTime) == ValueType.TFloat) {
-           DejaGnu.pass("NetStream.bufferTime property exists");
-       } else {
-           DejaGnu.fail("NetStream.bufferTime property doesn't exist");
-       }
-       if (Type.typeof(x1.bytesLoaded) == ValueType.TInt) {
-           DejaGnu.pass("NetStream.bytesLoaded property exists");
-       } else {
-           DejaGnu.fail("NetStream.bytesLoaded property doesn't exist");
-       }
-       if (Type.typeof(x1.bytesTotal) == ValueType.TInt) {
-           DejaGnu.pass("NetStream.bytesTotal property exists");
-       } else {
-           DejaGnu.fail("NetStream.bytesTotal property doesn't exist");
-       }
-       //FIXME: This read-only property must be initialized before it can be 
tested
-       if (Type.typeof(x1.time) == ValueType.TFloat) {
-           DejaGnu.xpass("NetStream.time property exists");
-       } else {
-           DejaGnu.xfail("NetStream.time property doesn't exist");
-       }
+               // Tests to see if all the properties exist. All these do is 
test for
+               // existance of a property, and don't test the functionality at 
all. This
+               // is primarily useful only to test completeness of the API 
implementation.
+               //FIXME: This read-only property must be initialized before it 
can be tested
+               if (Type.typeof(x1.bufferLength) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.bufferLength property exists");
+               } else {
+                       DejaGnu.fail("NetStream.bufferLength property doesn't 
exist");
+               }
+               if (Type.typeof(x1.bufferTime) == ValueType.TFloat) {
+                       DejaGnu.pass("NetStream.bufferTime property exists");
+               } else {
+                       DejaGnu.fail("NetStream.bufferTime property doesn't 
exist");
+               }
+               if (Type.typeof(x1.bytesLoaded) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.bytesLoaded property exists");
+               } else {
+                       DejaGnu.fail("NetStream.bytesLoaded property doesn't 
exist");
+               }
+       #if flash9
+               if (Type.typeof(x1.bytesTotal) == ValueType.TFloat) {
+                       DejaGnu.pass("NetStream.bytesTotal property exists");
+               } else {
+                       DejaGnu.fail("NetStream.bytesTotal property doesn't 
exist");
+               }
+       #end
+               if (Type.typeof(x1.time) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.time property exists");
+               } else {
+                       DejaGnu.fail("NetStream.time property doesn't exist");
+               }
 #if !flash9
-       //FIXME: This read-only property must be initialized before it can be 
tested
-       if (Type.typeof(x1.currentFps) == ValueType.TFloat) {
-           DejaGnu.xpass("NetStream.currentFps property exists");
-       } else {
-           DejaGnu.xfail("NetStream.currentFps property doesn't exist");
-       }
+               if (Type.typeof(x1.bytesTotal) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.bytesTotal property exists");
+               } else {
+                       DejaGnu.fail("NetStream.bytesTotal property doesn't 
exist");
+               }
+               if (Type.typeof(x1.currentFps) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.currentFps property exists");
+               } else {
+                       DejaGnu.fail("NetStream.currentFps property doesn't 
exist");
+               }
 #end
-       if (Type.typeof(x1.liveDelay) == ValueType.TFloat) {
-           DejaGnu.pass("NetStream.liveDelay property exists");
-       } else {
-           DejaGnu.xfail("NetStream.liveDelay property doesn't exist");
-       }
+               // Not implemented for gnash
+               if (Type.typeof(x1.liveDelay) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.liveDelay property exists");
+               } else {
+                       DejaGnu.xfail("NetStream.liveDelay property doesn't 
exist");
+               }
 #if flash9
-       if (Type.typeof(x1.currentFPS) == ValueType.TFloat) {
-           DejaGnu.pass("NetStream.currentFPS property exists");
-       } else {
-           DejaGnu.fail("NetStream.currentFPS property doesn't exist");
-       }
-//FIXME: This property only exists in haXe
-       if (Type.typeof(x1.audioCodec) == ValueType.TInt) {
-           DejaGnu.pass("NetStream.audioCodec property exists");
-       } else {
-           DejaGnu.fail("NetStream.audioCodec property doesn't exist");
-       }
-       if (Type.typeof(x1.checkPolicyFile) == ValueType.TBool) {
-           DejaGnu.pass("NetStream.checkPolicyFile property exists");
-       } else {
-           DejaGnu.fail("NetStream.checkPolicyFile property doesn't exist");
-       }
-       if (Std.is(x1.client, Dynamic)) {
-           DejaGnu.pass("NetStream.client property exists");
-       } else {
-           DejaGnu.fail("NetStream.client property doesn't exist");
-       }
-//FIXME: This property only exists in haXe
-       if (Type.typeof(x1.decodedFrames) == ValueType.TInt) {
-           DejaGnu.pass("NetStream.decodedFrames property exists");
-       } else {
-           DejaGnu.fail("NetStream.decodedFrames property doesn't exist");
-       }
-       if (Type.typeof(x1.objectEncoding) == ValueType.TInt) {
-           DejaGnu.pass("NetStream.objectEncoding property exists");
-       } else {
-           DejaGnu.fail("NetStream.objectEncoding property doesn't exist");
-       }
-       if (Std.is(x1.soundTransform, SoundTransform)) {
-           DejaGnu.pass("NetStream.soundTransform property exists");
-       } else {
-           DejaGnu.fail("NetStream.soundTransform property doesn't exist");
-       }
-//FIXME: This property only exists in haXe
-       if (Type.typeof(x1.videoCodec) == ValueType.TInt) {
-           DejaGnu.pass("NetStream.videoCodec property exists");
-       } else {
-           DejaGnu.fail("NetStream.videoCodec property doesn't exist");
-       }
+               if (Type.typeof(x1.currentFPS) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.currentFPS property exists");
+               } else {
+                       DejaGnu.fail("NetStream.currentFPS property doesn't 
exist");
+               }
+               //FIXME: This property only exists in haXe
+               if (Type.typeof(x1.audioCodec) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.audioCodec property exists");
+               } else {
+                       DejaGnu.fail("NetStream.audioCodec property doesn't 
exist");
+               }
+               if (Type.typeof(x1.checkPolicyFile) == ValueType.TBool) {
+                       DejaGnu.pass("NetStream.checkPolicyFile property 
exists");
+               } else {
+                       DejaGnu.fail("NetStream.checkPolicyFile property 
doesn't exist");
+               }
+               if (Std.is(x1.client, Dynamic)) {
+                       DejaGnu.pass("NetStream.client property exists");
+               } else {
+                       DejaGnu.fail("NetStream.client property doesn't exist");
+               }
+               //FIXME: This property only exists in haXe
+               if (Type.typeof(x1.decodedFrames) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.decodedFrames property exists");
+               } else {
+                       DejaGnu.fail("NetStream.decodedFrames property doesn't 
exist");
+               }
+               if (Type.typeof(x1.objectEncoding) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.objectEncoding property 
exists");
+               } else {
+                       DejaGnu.fail("NetStream.objectEncoding property doesn't 
exist");
+               }
+               if (Std.is(x1.soundTransform, SoundTransform)) {
+                       DejaGnu.pass("NetStream.soundTransform property 
exists");
+               } else {
+                       DejaGnu.fail("NetStream.soundTransform property doesn't 
exist");
+               }
+               //FIXME: This property only exists in haXe
+               if (Type.typeof(x1.videoCodec) == ValueType.TInt) {
+                       DejaGnu.pass("NetStream.videoCodec property exists");
+               } else {
+                       DejaGnu.fail("NetStream.videoCodec property doesn't 
exist");
+               }
 #end
 
-// Tests to see if all the methods exist. All these do is test for
-// existance of a method, and don't test the functionality at all. This
-// is primarily useful only to test completeness of the API implementation.
-//FIXME: This function exists for AS2 in haXe, but not in Adobe spec
-       if (Type.typeof(x1.attachAudio) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::attachAudio() method exists");
-       } else {
-           DejaGnu.fail("NetStream::attachAudio() method doesn't exist");
-       }
-       if (Type.typeof(x1.close) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::close() method exists");
-       } else {
-           DejaGnu.fail("NetStream::close() method doesn't exist");
-       }
-       if (Type.typeof(x1.pause) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::pause() method exists");
-       } else {
-           DejaGnu.fail("NetStream::pause() method doesn't exist");
-       }
-       if (Type.typeof(x1.play) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::play() method exists");
-       } else {
-           DejaGnu.fail("NetStream::play() method doesn't exist");
-       }
-//FIXME: This function exists for AS2 in haXe, but not in Adobe spec
-       if (Type.typeof(x1.publish) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::publish() method exists");
-       } else {
-           DejaGnu.fail("NetStream::publish() method doesn't exist");
-       }
-//FIXME: This function exists for AS2 in haXe, but not in Adobe spec
-       if (Type.typeof(x1.receiveAudio) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::receiveAudio() method exists");
-       } else {
-           DejaGnu.fail("NetStream::receiveAudio() method doesn't exist");
-       }
-//FIXME: This function exists for AS2 in haXe, but not in Adobe spec
-       if (Type.typeof(x1.receiveVideo) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::receiveVideo() method exists");
-       } else {
-           DejaGnu.fail("NetStream::receiveVideo() method doesn't exist");
-       }
-       if (Type.typeof(x1.seek) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::seek() method exists");
-       } else {
-           DejaGnu.fail("NetStream::seek() method doesn't exist");
-       }
-//FIXME: This function exists for AS2 in haXe, but not in Adobe spec
-       if (Type.typeof(x1.send) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::send() method exists");
-       } else {
-           DejaGnu.fail("NetStream::send() method doesn't exist");
-       }
-       if (Type.typeof(x1.close) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::close() method exists");
-       } else {
-           DejaGnu.fail("NetStream::close() method doesn't exist");
-       }
+               // Tests to see if all the methods exist. All these do is test 
for
+               // existance of a method, and don't test the functionality at 
all. This
+               // is primarily useful only to test completeness of the API 
implementation.
+               //FIXME: This function exists for AS2 in haXe, but not in Adobe 
spec
+               if (Type.typeof(x1.attachAudio) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::attachAudio() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::attachAudio() method doesn't 
exist");
+               }
+               if (Type.typeof(x1.close) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::close() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::close() method doesn't exist");
+               }
+               if (Type.typeof(x1.pause) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::pause() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::pause() method doesn't exist");
+               }
+               if (Type.typeof(x1.play) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::play() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::play() method doesn't exist");
+               }
+               //FIXME: This function exists for AS2 in haXe, but not in Adobe 
spec
+               if (Type.typeof(x1.publish) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::publish() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::publish() method doesn't 
exist");
+               }
+               //FIXME: This function exists for AS2 in haXe, but not in Adobe 
spec
+               if (Type.typeof(x1.receiveAudio) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::receiveAudio() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::receiveAudio() method doesn't 
exist");
+               }
+               //FIXME: This function exists for AS2 in haXe, but not in Adobe 
spec
+               if (Type.typeof(x1.receiveVideo) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::receiveVideo() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::receiveVideo() method doesn't 
exist");
+               }
+               if (Type.typeof(x1.seek) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::seek() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::seek() method doesn't exist");
+               }
+               //FIXME: This function exists for AS2 in haXe, but not in Adobe 
spec
+               if (Type.typeof(x1.send) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::send() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::send() method doesn't exist");
+               }
+               if (Type.typeof(x1.close) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::close() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::close() method doesn't exist");
+               }
 #if !flash9
-       if (Type.typeof(x1.setBufferTime) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::setBufferTime() method exists");
-       } else {
-           DejaGnu.fail("NetStream::setBufferTime() method doesn't exist");
-       }
+               if (Type.typeof(x1.setBufferTime) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::setBufferTime() method 
exists");
+               } else {
+                       DejaGnu.fail("NetStream::setBufferTime() method doesn't 
exist");
+               }
 #end
 #if flash9
-       if (Type.typeof(x1.attachCamera) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::attachCamera() method exists");
-       } else {
-           DejaGnu.fail("NetStream::attachCamera() method doesn't exist");
-       }
-//FIXME: Property receiveVideoFPS not found on flash.net.NetStream and there 
is no default value
-//     if (Type.typeof(x1.receiveVideoFPS) == ValueType.TFunction) {
-//         DejaGnu.pass("NetStream::receiveVideoFPS() method exists");
-//     } else {
-//         DejaGnu.fail("NetStream::receiveVideoFPS() method doesn't exist");
-//     }
-// AIR only
-//     if (x1.resetDRMVouchers == null) {
-//         DejaGnu.pass("NetStream::resetDRMVouchers() method exists");
-//     } else {
-//         DejaGnu.fail("NetStream::resetDRMVouchers() method doesn't exist");
-//     }
-       if (Type.typeof(x1.resume) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::resume() method exists");
-       } else {
-           DejaGnu.fail("NetStream::resume() method doesn't exist");
-       }
-// AIR only
-//     if (x1.setDRMAuthenticationCredentials == null) {
-//         DejaGnu.pass("NetStream::setDRMAuthenticationCredentials() method 
exists");
-//     } else {
-//         DejaGnu.fail("NetStream::setDRMAuthenticationCredentials() method 
doesn't exist");
-//     }
-       if (Type.typeof(x1.togglePause) == ValueType.TFunction) {
-           DejaGnu.pass("NetStream::togglePause() method exists");
-       } else {
-           DejaGnu.fail("NetStream::togglePause() method doesn't exist");
-       }
+               if (Type.typeof(x1.attachCamera) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::attachCamera() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::attachCamera() method doesn't 
exist");
+               }
+               //FIXME: Property receiveVideoFPS not found on 
flash.net.NetStream and there is no default value
+               //      if (Type.typeof(x1.receiveVideoFPS) == 
ValueType.TFunction) {
+               //          DejaGnu.pass("NetStream::receiveVideoFPS() method 
exists");
+               //      } else {
+               //          DejaGnu.fail("NetStream::receiveVideoFPS() method 
doesn't exist");
+               //      }
+               // AIR only
+               //      if (x1.resetDRMVouchers == null) {
+               //          DejaGnu.pass("NetStream::resetDRMVouchers() method 
exists");
+               //      } else {
+               //          DejaGnu.fail("NetStream::resetDRMVouchers() method 
doesn't exist");
+               //      }
+               if (Type.typeof(x1.resume) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::resume() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::resume() method doesn't 
exist");
+               }
+               // AIR only
+               //      if (x1.setDRMAuthenticationCredentials == null) {
+               //          
DejaGnu.pass("NetStream::setDRMAuthenticationCredentials() method exists");
+               //      } else {
+               //          
DejaGnu.fail("NetStream::setDRMAuthenticationCredentials() method doesn't 
exist");
+               //      }
+               if (Type.typeof(x1.togglePause) == ValueType.TFunction) {
+                       DejaGnu.pass("NetStream::togglePause() method exists");
+               } else {
+                       DejaGnu.fail("NetStream::togglePause() method doesn't 
exist");
+               }
 #end
 
         // Call this after finishing all tests. It prints out the totals.


reply via email to

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