gnash-commit
[Top][All Lists]
Advanced

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

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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/asobj/System.cpp testsui...
Date: Wed, 12 Dec 2007 04:31:05 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/12 04:31:05

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

Log message:
        Add placeholders for System.capabilities props os, manufactorer, 
playerType.
        Add tests for all known members of that object.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5138&r2=1.5139
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/System.cpp?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/System.as?cvsroot=gnash&r1=1.13&r2=1.14

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5138
retrieving revision 1.5139
diff -u -b -r1.5138 -r1.5139
--- ChangeLog   12 Dec 2007 04:06:40 -0000      1.5138
+++ ChangeLog   12 Dec 2007 04:31:04 -0000      1.5139
@@ -1,5 +1,13 @@
 2007-12-12 Sandro Santilli <address@hidden>
 
+       * server/asobj/System.cpp: add System.capabilities properties
+         os, playerType and manufactorer. Would need a real implementation
+         as this is just a placeholder.
+       * testsuite/actionscript.all/System.as: test availability of
+         known System.capabilities members.
+
+2007-12-12 Sandro Santilli <address@hidden>
+
        * server/vm/ASHandlers.cpp (ActionGetMember): print ascoding error
          if trying to reference unexisitng object member.
        * testsuite/misc-swfc.all/Makefile.am: use double quotes to allow for

Index: server/asobj/System.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/System.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- server/asobj/System.cpp     31 Aug 2007 21:53:32 -0000      1.15
+++ server/asobj/System.cpp     12 Dec 2007 04:31:05 -0000      1.16
@@ -93,8 +93,24 @@
        static boost::intrusive_ptr<as_object> proto;
        if ( proto == NULL )
        {
+               int flags  = as_prop_flags::dontDelete;
+                   flags |= as_prop_flags::dontEnum;
+                   flags |= as_prop_flags::readOnly;
+
                proto = new as_object(getObjectInterface());
-               proto->init_member("version", VM::get().getPlayerVersion() );
+
+               proto->init_member("version", VM::get().getPlayerVersion(), 
flags);
+
+               // TODO:
+               // "stand-alone", "external", "plug-in", or "ActiveX". 
+               proto->init_member("playerType", "stand-alone", flags);
+
+               // TODO: 
+               // "Windows XP", "Windows 2000", "Windows NT", "Windows 98/ME", 
"Windows 95", "Windows CE", "Linux", "MacOS"
+               proto->init_member("os", "GNU", flags);
+
+               // TODO: should be manufacturer and platform
+               proto->init_member("manufacturer", "GNU Gnash", flags);
        }
        return proto.get();
 }

Index: testsuite/actionscript.all/System.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/System.as,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- testsuite/actionscript.all/System.as        29 Sep 2007 16:22:58 -0000      
1.13
+++ testsuite/actionscript.all/System.as        12 Dec 2007 04:31:05 -0000      
1.14
@@ -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: System.as,v 1.13 2007/09/29 16:22:58 strk Exp $";
+rcsid="$Id: System.as,v 1.14 2007/12/12 04:31:05 strk Exp $";
 
 #include "check.as"
 
@@ -61,9 +61,42 @@
 check_equals(typeof(_global.$version), 'undefined');
 check_equals(typeof(this.$version), 'string');
 check_equals(this.$version, System.capabilities.version);
+check_equals(typeof(System.capabilities.os), 'string');
+check_equals(typeof(System.capabilities.manufacturer), 'string');
+check_equals(typeof(System.capabilities.playerType), 'string');
+xcheck_equals(typeof(System.capabilities.serverString), 'string');
+xcheck_equals(typeof(System.capabilities.screenResolutionX), 'number');
+xcheck_equals(typeof(System.capabilities.screenResolutionY), 'number');
+xcheck_equals(typeof(System.capabilities.screenDPI), 'number');
+xcheck_equals(typeof(System.capabilities.screenColor), 'string');
+xcheck_equals(typeof(System.capabilities.pixelAspectRatio), 'string');
+xcheck_equals(typeof(System.capabilities.localFileReadDisable), 'boolean');
+xcheck_equals(typeof(System.capabilities.language), 'string');
+xcheck_equals(typeof(System.capabilities.isDebugger), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasVideoEncoder), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasStreamingVideo), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasStreamingAudio), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasScreenPlayback), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasScreenBroadcast), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasPrinting), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasMP3), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasEmbeddedVideo), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasAudioEncoder), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasAudio), 'boolean');
+xcheck_equals(typeof(System.capabilities.hasAccessibility), 'boolean');
+xcheck_equals(typeof(System.capabilities.avHardwareDisable), 'boolean');
+
 #if OUTPUT_VERSION >= 6
 check(this.hasOwnProperty("$version"));
 check(! MovieClip.prototype.hasOwnProperty("$version") );
 #endif
 
-totals();
+#if OUTPUT_VERSION > 6
+ check_totals(40);
+#else
+# if OUTPUT_VERSION == 6
+   check_totals(39);
+# else
+   check_totals(37);
+# endif
+#endif




reply via email to

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