[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/System.cpp testsui...
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/System.cpp testsui... |
Date: |
Mon, 14 Apr 2008 14:16:40 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/04/14 14:16:39
Modified files:
. : ChangeLog
server/asobj : System.cpp
testsuite/actionscript.all: System.as
Log message:
* testsuite/actionscript.all/System.as: test hasOwnProperty for
SWF6+, be more selective about testing different versions.
* server/asobj/System.cpp: exactSettings only available in SWF6
or above.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6269&r2=1.6270
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/System.cpp?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/System.as?cvsroot=gnash&r1=1.24&r2=1.25
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6269
retrieving revision 1.6270
diff -u -b -r1.6269 -r1.6270
--- ChangeLog 14 Apr 2008 09:33:09 -0000 1.6269
+++ ChangeLog 14 Apr 2008 14:16:38 -0000 1.6270
@@ -1,5 +1,12 @@
2008-04-14 Benjamin Wolsey <address@hidden>
+ * testsuite/actionscript.all/System.as: test hasOwnProperty for
+ SWF6+, be more selective about testing different versions.
+ * server/asobj/System.cpp: exactSettings only available in SWF6
+ or above.
+
+2008-04-14 Benjamin Wolsey <address@hidden>
+
* gui/gtk.cpp: gdk_screen_get_resolution only available from
version 2.10 onwards (thanks buildbot!).
Index: server/asobj/System.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/System.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- server/asobj/System.cpp 14 Apr 2008 08:55:28 -0000 1.28
+++ server/asobj/System.cpp 14 Apr 2008 14:16:39 -0000 1.29
@@ -256,10 +256,15 @@
proto.init_member("setClipboard", new
builtin_function(system_setclipboard));
proto.init_member("showSettings", new
builtin_function(system_showsettings));
+ VM& vm = proto.getVM();
+ const int version = vm.getSWFVersion();
+
as_c_function_ptr gettersetter;
+ if (version > 5) {
gettersetter = &system_exactsettings;
proto.init_property("exactSettings", *gettersetter, *gettersetter);
+ }
gettersetter = &system_usecodepage;
proto.init_property("useCodepage", *gettersetter, *gettersetter);
Index: testsuite/actionscript.all/System.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/System.as,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- testsuite/actionscript.all/System.as 14 Apr 2008 08:36:19 -0000
1.24
+++ testsuite/actionscript.all/System.as 14 Apr 2008 14:16:39 -0000
1.25
@@ -21,11 +21,43 @@
// execute it like this gnash -1 -r 0 -v out.swf
-rcsid="$Id: System.as,v 1.24 2008/04/14 08:36:19 bwy Exp $";
+rcsid="$Id: System.as,v 1.25 2008/04/14 14:16:39 bwy Exp $";
#include "check.as"
check_equals(typeof(System), 'object');
+#if OUTPUT_VERSION > 5
+check(System.capabilities.hasOwnProperty("version"));
+check(System.capabilities.hasOwnProperty("os"));
+check(System.capabilities.hasOwnProperty("manufacturer"));
+check(System.capabilities.hasOwnProperty("playerType"));
+check(System.capabilities.hasOwnProperty("serverString"));
+check(System.capabilities.hasOwnProperty("screenResolutionX"));
+check(System.capabilities.hasOwnProperty("screenResolutionY"));
+check(System.capabilities.hasOwnProperty("screenDPI"));
+check(System.capabilities.hasOwnProperty("screenColor"));
+check(System.capabilities.hasOwnProperty("pixelAspectRatio"));
+check(System.capabilities.hasOwnProperty("localFileReadDisable"));
+check(System.capabilities.hasOwnProperty("language"));
+check(System.capabilities.hasOwnProperty("isDebugger"));
+check(System.capabilities.hasOwnProperty("hasVideoEncoder"));
+check(System.capabilities.hasOwnProperty("hasStreamingVideo"));
+check(System.capabilities.hasOwnProperty("hasStreamingAudio"));
+check(System.capabilities.hasOwnProperty("hasScreenPlayback"));
+check(System.capabilities.hasOwnProperty("hasScreenBroadcast"));
+check(System.capabilities.hasOwnProperty("hasPrinting"));
+check(System.capabilities.hasOwnProperty("hasMP3"));
+check(System.capabilities.hasOwnProperty("hasEmbeddedVideo"));
+check(System.capabilities.hasOwnProperty("hasAudioEncoder"));
+check(System.capabilities.hasOwnProperty("hasAudio"));
+check(System.capabilities.hasOwnProperty("hasAccessibility"));
+check(System.capabilities.hasOwnProperty("avHardwareDisable"));
+check(System.capabilities.hasOwnProperty("windowlessDisable"));
+
+check(System.hasOwnProperty("exactSettings"));
+#endif
+
+
// _global.System is NOT a class, just an object
var systemObj = new System;
check_equals ( typeof(systemObj), 'undefined' );
@@ -86,20 +118,25 @@
check_equals(typeof(System.capabilities.avHardwareDisable), 'boolean');
check_equals(typeof(System.capabilities.windowlessDisable), 'boolean');
-// Not present on Linux player version 9,0,115,0, is (?) on windows.
+// Not present on Linux player version 9,0,115,0, but is (?) on windows.
check_equals(typeof(System.capabilities.hasIME), 'boolean');
+note(" System.capabilities.hasIME certainly fails on the pp on\n\
+ some platforms. There's no verification that it exists at all so far.");
// Added in Player version 9.
check_equals(typeof(System.capabilities.hasTLS), 'boolean');
// System.exactSettings
+#if OUTPUT_VERSION > 5
check_equals(typeof(System.exactSettings), 'boolean');
-value = System.exactSettings;
System.exactSettings = true;
-check_equals(System.exactSettings, value);
+check_equals(System.exactSettings, true);
System.exactSettings = false;
-check_equals(System.exactSettings, value);
+xcheck_equals(System.exactSettings, false);
+#else
+check_equals(typeof(System.exactSettings), 'undefined');
+#endif
#if OUTPUT_VERSION >= 6
check(this.hasOwnProperty("$version"));
@@ -125,8 +162,11 @@
check_equals(typeof(System.showSettings), 'function');
xcheck_equals(typeof(System.Product), 'function');
+
+#if OUTPUT_VERSION > 5
xcheck (System.Product.prototype.hasOwnProperty('launch'));
xcheck (System.Product.prototype.hasOwnProperty('download'));
+#endif
p = new System.Product("whatisthis");
xcheck_equals(typeof(p), 'object');
@@ -137,11 +177,11 @@
xcheck_equals(typeof(p.launch), 'function');
#if OUTPUT_VERSION > 6
- check_totals(56);
+ check_totals(83);
#else
# if OUTPUT_VERSION == 6
- check_totals(55);
+ check_totals(82);
# else
- check_totals(53);
+ check_totals(49);
# endif
#endif