gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9785: Tests for MovieClip propertie


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9785: Tests for MovieClip properties, plus a rename that was languishing forgotten
Date: Thu, 18 Sep 2008 21:11:38 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9785
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2008-09-18 21:11:38 +0200
message:
  Tests for MovieClip properties, plus a rename that was languishing forgotten
  somewhere.
renamed:
  libcore/asobj/System.cpp => libcore/asobj/System_as.cpp
  libcore/asobj/System.h => libcore/asobj/System_as.h
modified:
  libcore/asobj/Makefile.am
  testsuite/actionscript.all/MovieClip.as
  libcore/asobj/System_as.cpp
    ------------------------------------------------------------
    revno: 9783.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-09-18 20:09:55 +0200
    message:
      Rename, clean up System_as.
    renamed:
      libcore/asobj/System.cpp => libcore/asobj/System_as.cpp
      libcore/asobj/System.h => libcore/asobj/System_as.h
    modified:
      libcore/asobj/Makefile.am
      libcore/asobj/System_as.cpp
    ------------------------------------------------------------
    revno: 9783.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-09-18 20:10:08 +0200
    message:
      Test for MovieClip properties, many of which are absent in Gnash.
    modified:
      testsuite/actionscript.all/MovieClip.as
=== modified file 'libcore/asobj/Makefile.am'
--- a/libcore/asobj/Makefile.am 2008-09-16 17:45:34 +0000
+++ b/libcore/asobj/Makefile.am 2008-09-18 18:09:55 +0000
@@ -66,7 +66,7 @@
        SharedObject.cpp\
        Sound.cpp \
        Stage.cpp \
-       System.cpp \
+       System_as.cpp \
        TextFormat.cpp \
        TextSnapshot.cpp \
        MovieClipLoader.cpp\
@@ -137,7 +137,7 @@
        SoundGst.h \
        SoundMad.h \
        Stage.h \
-       System.h \
+       System_as.h \
        TextFormat.h \
        TextSnapshot.h \
        String_as.h \

=== renamed file 'libcore/asobj/System.cpp' => 'libcore/asobj/System_as.cpp'
--- a/libcore/asobj/System.cpp  2008-09-04 03:04:47 +0000
+++ b/libcore/asobj/System_as.cpp       2008-09-18 18:09:55 +0000
@@ -26,9 +26,12 @@
 #include "builtin_function.h"
 #include "VM.h" // for getPlayerVersion() 
 #include "Object.h" // for getObjectInterface
-#include "URL.h" // for encoding serverString
 
-#define TF(x) (x ? "t" : "f")
+inline std::string
+trueFalse(bool x)
+{
+    return x ? "t" : "f";
+}
 
 namespace gnash {
 
@@ -202,18 +205,18 @@
        // This should be the standard order of parameters in the server
        // string.
        std::ostringstream serverString;
-       serverString << "A="    << TF(hasAudio)
-                       << "&SA="       << TF(hasStreamingAudio)
-                       << "&SV="       << TF(hasStreamingVideo)
-                       << "&EV="       << TF(hasEmbeddedVideo)
-                       << "&MP3="      << TF(hasMP3)                           
                
-                       << "&AE="       << TF(hasAudioEncoder)
-                       << "&VE="       << TF(hasVideoEncoder)
-                       << "&ACC="      << TF(hasAccessibility)
-                       << "&PR="       << TF(hasPrinting)
-                       << "&SP="       << TF(hasScreenPlayback) 
-                       << "&SB="       << TF(hasScreenBroadcast) 
-                       << "&DEB="      << TF(isDebugger)
+       serverString << "A="    << trueFalse(hasAudio)
+                       << "&SA="       << trueFalse(hasStreamingAudio)
+                       << "&SV="       << trueFalse(hasStreamingVideo)
+                       << "&EV="       << trueFalse(hasEmbeddedVideo)
+                       << "&MP3="      << trueFalse(hasMP3)                    
                        
+                       << "&AE="       << trueFalse(hasAudioEncoder)
+                       << "&VE="       << trueFalse(hasVideoEncoder)
+                       << "&ACC="      << trueFalse(hasAccessibility)
+                       << "&PR="       << trueFalse(hasPrinting)
+                       << "&SP="       << trueFalse(hasScreenPlayback) 
+                       << "&SB="       << trueFalse(hasScreenBroadcast) 
+                       << "&DEB="      << trueFalse(isDebugger)
                        << "&V="    << URL::encode(version)
                        << "&M="    << URL::encode(manufacturer)
                        << "&R="    << screenResolutionX << "x" << 
screenResolutionY
@@ -223,10 +226,10 @@
                        << "&OS="   << URL::encode(os)
                        << "&L="    << language                 
                        << "&PT="   << playerType
-                       << "&AVD="      << TF(avHardwareDisable) 
-                       << "&LFD="      << TF(localFileReadDisable)
-                       << "&WD="   << TF(windowlessDisable)
-                       << "&TLS="      << TF(hasTLS);
+                       << "&AVD="      << trueFalse(avHardwareDisable) 
+                       << "&LFD="      << trueFalse(localFileReadDisable)
+                       << "&WD="   << trueFalse(windowlessDisable)
+                       << "&TLS="      << trueFalse(hasTLS);
        
        static boost::intrusive_ptr<as_object> proto;
        if ( proto == NULL )
@@ -355,7 +358,7 @@
 
 
 // FIXME: if true, SWF6+ should treat characters as Latin
-// charset variants. If false (default), as UTF-8.
+// charset variants. If false (default), as UtrueFalse-8.
 // Can be set.
 as_value
 system_usecodepage(const fn_call& fn)

=== renamed file 'libcore/asobj/System.h' => 'libcore/asobj/System_as.h'
=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as   2008-09-16 09:28:54 +0000
+++ b/testsuite/actionscript.all/MovieClip.as   2008-09-18 18:10:08 +0000
@@ -23,23 +23,72 @@
 rcsid="$Id: MovieClip.as,v 1.133 2008/05/09 13:21:08 strk Exp $";
 #include "check.as"
 
+
+#if OUTPUT_VERSION == 5
+Object.prototype.hasOwnProperty = ASnative(101, 5);
+#endif
+
+xcheck(MovieClip.prototype.hasOwnProperty("blendMode"));
+xcheck(MovieClip.prototype.hasOwnProperty("attachBitmap"));
+xcheck(MovieClip.prototype.hasOwnProperty("cacheAsBitmap"));
+check(MovieClip.prototype.hasOwnProperty("enabled"));
+xcheck(MovieClip.prototype.hasOwnProperty("filters"));
+xcheck(MovieClip.prototype.hasOwnProperty("forceSmoothing"));
+xcheck(MovieClip.prototype.hasOwnProperty("opaqueBackground"));
+xcheck(MovieClip.prototype.hasOwnProperty("scale9Grid"));
+xcheck(MovieClip.prototype.hasOwnProperty("scrollRect"));
+xcheck(MovieClip.prototype.hasOwnProperty("tabIndex"));
+xcheck(MovieClip.prototype.hasOwnProperty("transform"));
+check(MovieClip.prototype.hasOwnProperty("useHandCursor"));
+check(MovieClip.prototype.hasOwnProperty("_lockroot"));
+
+check(!MovieClip.prototype.hasOwnProperty("focusEnabled"));
+check(!MovieClip.prototype.hasOwnProperty("hitArea"));
+check(!MovieClip.prototype.hasOwnProperty("menu"));
+check(!MovieClip.prototype.hasOwnProperty("tabChildren"));
+check(!MovieClip.prototype.hasOwnProperty("tabEnabled"));
+check(!MovieClip.prototype.hasOwnProperty("trackAsMenu"));
+check(!MovieClip.prototype.hasOwnProperty("_alpha"));
+check(!MovieClip.prototype.hasOwnProperty("_currentframe"));
+check(!MovieClip.prototype.hasOwnProperty("_droptarget"));
+check(!MovieClip.prototype.hasOwnProperty("_focusrect"));
+check(!MovieClip.prototype.hasOwnProperty("_height"));
+check(!MovieClip.prototype.hasOwnProperty("_highquality"));
+check(!MovieClip.prototype.hasOwnProperty("_name"));
+check(!MovieClip.prototype.hasOwnProperty("_parent"));
+check(!MovieClip.prototype.hasOwnProperty("_quality"));
+check(!MovieClip.prototype.hasOwnProperty("_rotation"));
+check(!MovieClip.prototype.hasOwnProperty("_soundbuftime"));
+check(!MovieClip.prototype.hasOwnProperty("_target"));
+check(!MovieClip.prototype.hasOwnProperty("_totalframes"));
+check(!MovieClip.prototype.hasOwnProperty("_url"));
+check(!MovieClip.prototype.hasOwnProperty("_visible"));
+check(!MovieClip.prototype.hasOwnProperty("_width"));
+check(!MovieClip.prototype.hasOwnProperty("_x"));
+check(!MovieClip.prototype.hasOwnProperty("_xmouse"));
+check(!MovieClip.prototype.hasOwnProperty("_xscale"));
+check(!MovieClip.prototype.hasOwnProperty("_y"));
+check(!MovieClip.prototype.hasOwnProperty("_ymouse"));
+check(!MovieClip.prototype.hasOwnProperty("_yscale"));
+
+
 // To be called at end of test
 endOfTest = function() 
 {
 #if OUTPUT_VERSION <= 5
-       check_totals(234); // SWF5
+       check_totals(275); // SWF5
 #endif
 
 #if OUTPUT_VERSION == 6
-       check_totals(664); // SWF6
+       check_totals(705); // SWF6
 #endif
 
 #if OUTPUT_VERSION == 7
-       check_totals(681); // SWF7
+       check_totals(722); // SWF7
 #endif
 
 #if OUTPUT_VERSION >= 8
-       check_totals(682); // SWF8+
+       check_totals(723); // SWF8+
 #endif
 
        play();


reply via email to

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