gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Glob...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Glob...
Date: Tue, 06 Feb 2007 11:00:37 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/02/06 11:00:36

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: Global.as delete.as getvariable.as 
        server         : as_environment.cpp 

Log message:
                * server/as_environment.cpp (get_variable_raw):
                  Don't provide "_global" when SWF version is < 6.
                * testsuite/actionscript.all/getvariable.as: don't expect
                  failures in SWF5 mode (_global related)
                * testsuite/actionscript.all/Global.as: use check_equals
                  when possible, fix for missing SWF5 _global, remove
                  escape() tests with SWF > 5 as I can't confirm correct
                  result.
                * testsuite/actionscript.all/delete.as: fix for SWF5 run
                  (_global related).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2253&r2=1.2254
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Global.as?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/delete.as?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/getvariable.as?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.cpp?cvsroot=gnash&r1=1.54&r2=1.55

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2253
retrieving revision 1.2254
diff -u -b -r1.2253 -r1.2254
--- ChangeLog   5 Feb 2007 22:22:32 -0000       1.2253
+++ ChangeLog   6 Feb 2007 11:00:36 -0000       1.2254
@@ -1,3 +1,16 @@
+2007-02-06 Sandro Santilli <address@hidden>
+
+       * server/as_environment.cpp (get_variable_raw):
+         Don't provide "_global" when SWF version is < 6.
+       * testsuite/actionscript.all/getvariable.as: don't expect
+         failures in SWF5 mode (_global related)
+       * testsuite/actionscript.all/Global.as: use check_equals
+         when possible, fix for missing SWF5 _global, remove
+         escape() tests with SWF > 5 as I can't confirm correct
+         result.
+       * testsuite/actionscript.all/delete.as: fix for SWF5 run
+         (_global related).
+
 2007-02-05 Tomas Groth Christensen <address@hidden>
 
        * server/asobj/NetConnection.cpp: Make sure we don't setup a connection

Index: testsuite/actionscript.all/Global.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Global.as,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- testsuite/actionscript.all/Global.as        3 Feb 2007 04:03:30 -0000       
1.18
+++ testsuite/actionscript.all/Global.as        6 Feb 2007 11:00:36 -0000       
1.19
@@ -20,12 +20,16 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: Global.as,v 1.18 2007/02/03 04:03:30 martinwguy Exp $";
+rcsid="$Id: Global.as,v 1.19 2007/02/06 11:00:36 strk Exp $";
 
 #include "check.as"
 
 // Check that _global.parseInt is in effect what parseInt resolves to
+#if OUTPUT_VERSION > 5
 check ( parseInt == _global.parseInt );
+#else
+check_equals ( typeof(_global.parseInt), 'undefined' );
+#endif
 
 // Test parseInt
 check ( parseInt('45b') == 45 );
@@ -35,7 +39,9 @@
 // Test parseint with hex
 check ( parseInt('0x111') == 273 );
 // Test parseint with octal
-check (parseInt('   0352') == 0352 );
+check_equals (parseInt('   0352'), 352 );
+// a '0' prefix turns the number into an octal one ?
+check (parseInt('   0352') != 0352 );
 // Test parseint with 36 base
 check ( parseInt('2GA',36) == (10+16*36+2*36*36) );
 // Test parseint with base 17 - the 'H' is not part of base 17, only the first 
two digits are valid
@@ -57,17 +63,30 @@
 check ( isNaN(parseFloat('         x1.234')) );
 
 // All %NN must become the corresponding ascii char
-check ( unescape('%3A%2F%3F%3D%26') == ':/?=&' );
-check ( unescape('%3a%2f%3f%3d%26') == ':/?=&' );
-check ( unescape('%3a%2f%3f%3d%26%') == ':/?=&%' );
-check ( unescape('%3a%2f%3f%3d%26%2') == ':/?=&%2' );
+check_equals ( unescape('%3A%2F%3F%3D%26'), ':/?=&' );
+check_equals ( unescape('%3a%2f%3f%3d%26'), ':/?=&' );
+#if OUTPUT_VERSION == 5
+check_equals ( unescape('%3a%2f%3f%3d%26%'), ':/?=&387' ); // SWF5
+#else
+// TODO: check output in SWF6 and higher
+// (possibly UTF8, player LNX 7,0,25,0 reveals a memory corruption)
+check_equals ( unescape('%3a%2f%3f%3d%26%'), ':/?=&' ); // SWF6
+#endif
+
+#if OUTPUT_VERSION == 5
+check_equals ( unescape('%3a%2f%3f%3d%26%2'), ':/?=&87' ); // SWF5
+#else
+// TODO: check output in SWF6 and higher
+// (possibly UTF8, player LNX 7,0,25,0 reveals a memory corruption)
+#endif
 
 // All URL-special chars become the corresponding %NN hex
-check (escape(' "#$%&+,/:;<=') == '%20%22%23%24%25%26%2B%2C%2F%3A%3B%3C%3D');
-check (escape('>address@hidden|}~') == '%3E%3F%40%5B%5C%5D%5E%60%7B%7C%7D%7E');
-check (escape('!()*-._0123456789') == '!()*-._0123456789');
-check (escape('ABCDEFGHIJKLMNOPQRSTUVWXYZ') == 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
-check (escape('abcdefghijklmnopqrstuvwxyz') == 'abcdefghijklmnopqrstuvwxyz');
+check_equals (escape(' "#$%&+,/:;<='), 
'%20%22%23%24%25%26%2B%2C%2F%3A%3B%3C%3D');
+check_equals (escape('>address@hidden|}~'), 
'%3E%3F%40%5B%5C%5D%5E%60%7B%7C%7D%7E');
+//check_equals (escape('!()*-._0123456789'), '!()*-._0123456789');
+check_equals (escape('!()*-._0123456789'), '%21%28%29%2A%2D%2E%5F0123456789'); 
// SWF5
+check_equals (escape('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
+check_equals (escape('abcdefghijklmnopqrstuvwxyz'), 
'abcdefghijklmnopqrstuvwxyz');
 
 // How to test failure of setInterval and success of clearInterval ?
 // The problem is that there is no way 

Index: testsuite/actionscript.all/delete.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/delete.as,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/actionscript.all/delete.as        10 Dec 2006 18:39:22 -0000      
1.7
+++ testsuite/actionscript.all/delete.as        6 Feb 2007 11:00:36 -0000       
1.8
@@ -1,4 +1,4 @@
-rcsid="$Id: delete.as,v 1.7 2006/12/10 18:39:22 strk Exp $";
+rcsid="$Id: delete.as,v 1.8 2007/02/06 11:00:36 strk Exp $";
 
 #include "check.as"
 
@@ -29,8 +29,15 @@
        check(delete a);
        check_equals(a, "a");
        check(delete a);
+
+#if OUTPUT_VERSION > 5
        check_equals(a, "_global.a");
        check(delete a);
+#else
+       check_equals(a, undefined);
+       check(! delete a);
+#endif
+
        check_equals(a, undefined);
        check(!delete a);
 }

Index: testsuite/actionscript.all/getvariable.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/getvariable.as,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- testsuite/actionscript.all/getvariable.as   15 Jan 2007 00:06:59 -0000      
1.5
+++ testsuite/actionscript.all/getvariable.as   6 Feb 2007 11:00:36 -0000       
1.6
@@ -19,7 +19,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: getvariable.as,v 1.5 2007/01/15 00:06:59 strk Exp $";
+rcsid="$Id: getvariable.as,v 1.6 2007/02/06 11:00:36 strk Exp $";
 
 #include "check.as"
 
@@ -244,7 +244,7 @@
 check_equals(checkpoint, 1);
 #else // OUTPUT_VERSION < 6
 // _global was added in SWF6 !
-xcheck_equals(checkpoint, undefined);
+check_equals(checkpoint, undefined);
 #endif
 
 //-----------------------------------------------------------------------

Index: server/as_environment.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_environment.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- server/as_environment.cpp   15 Jan 2007 14:16:06 -0000      1.54
+++ server/as_environment.cpp   6 Feb 2007 11:00:36 -0000       1.55
@@ -16,7 +16,7 @@
 
 //
 
-/* $Id: as_environment.cpp,v 1.54 2007/01/15 14:16:06 strk Exp $ */
+/* $Id: as_environment.cpp,v 1.55 2007/02/06 11:00:36 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -139,12 +139,17 @@
        return as_value(m_target->get_root_movie());
     }
 
-    as_object* global = VM::get().getGlobal();
+    VM& vm = VM::get();
+    as_object* global = vm.getGlobal();
 
-    if (varname == "_global") {
+    if ( vm.getSWFVersion() > 5 && varname == "_global" )
+    {
+       // The "_global" ref was added in SWF6
        return as_value(global);
     }
-    if (global->get_member(varname.c_str(), &val)) {
+
+    if (global->get_member(varname.c_str(), &val))
+    {
        return val;
     }
     




reply via email to

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