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/Stri...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Stri...
Date: Thu, 27 Sep 2007 16:54:49 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/09/27 16:54:49

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: String.as 

Log message:
                * testsuite/actionscript.all/String.as: tests for toString and 
it's
                  deletion/unprotection from deletion (succeeds from SWF7 and 
higher,
                  fails up to SWF6)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4447&r2=1.4448
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?cvsroot=gnash&r1=1.20&r2=1.21

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4447
retrieving revision 1.4448
diff -u -b -r1.4447 -r1.4448
--- ChangeLog   27 Sep 2007 15:42:10 -0000      1.4447
+++ ChangeLog   27 Sep 2007 16:54:48 -0000      1.4448
@@ -1,5 +1,11 @@
 2007-09-27 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/String.as: tests for toString and it's
+         deletion/unprotection from deletion (succeeds from SWF7 and higher,
+         fails up to SWF6)
+
+2007-09-27 Sandro Santilli <address@hidden>
+
        * testsuite/actionscript.all/Global.as: add test for
          parseInt(<stringObject>).
        * server/asobj/Global.cpp (as_global_parseint): fix

Index: testsuite/actionscript.all/String.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/String.as,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- testsuite/actionscript.all/String.as        25 Aug 2007 23:11:00 -0000      
1.20
+++ testsuite/actionscript.all/String.as        27 Sep 2007 16:54:49 -0000      
1.21
@@ -16,7 +16,7 @@
 
 // Original author: Mike Carlson - June 19th, 2006
 
-rcsid="$Id: String.as,v 1.20 2007/08/25 23:11:00 strk Exp $";
+rcsid="$Id: String.as,v 1.21 2007/09/27 16:54:49 strk Exp $";
 
 #include "check.as"
 
@@ -288,9 +288,11 @@
 #endif
 check_equals(b+c, "two[type Object]");
 
+ObjectProtoToStringBackup = Object.prototype.toString;
 Object.prototype.toString = undefined;
 check_equals(typeof(c.toString), 'function');
 check_equals(b+c, "two[type Object]");
+Object.prototype.toString = ObjectProtoToStringBackup;
 
 c.toString = undefined;
 check_equals(typeof(c.toString), 'undefined');
@@ -317,3 +319,33 @@
 #endif
 check_equals(numberObject.toString(), stringObject);
 check_equals(numberObject.toString(), stringObject.toString());
+
+//----------------------------------------------------------------------
+// Drop the toString method of a string (also a test for ASSetPropFlags)
+//----------------------------------------------------------------------
+
+s = new String("a");
+check_equals(typeof(Object.prototype.toString), 'function');
+check_equals(typeof(s.toString), 'function');
+check(! delete String.prototype.toString);
+ASSetPropFlags(String.prototype, "toString", 0, 7); // unprotect from deletion
+StringProtoToStringBackup = String.prototype.toString;
+#if OUTPUT_VERSION < 7
+ xcheck(delete String.prototype.toString);
+#else
+ check(delete String.prototype.toString);
+#endif
+check_equals(typeof(s.toString), 'function');
+check(!delete Object.prototype.toString);
+ASSetPropFlags(Object.prototype, "toString", 0, 7); // unprotect from deletion
+ObjectProtoToStringBackup = Object.prototype.toString;
+#if OUTPUT_VERSION < 7
+ xcheck(delete Object.prototype.toString);
+ xcheck_equals(typeof(s.toString), 'undefined');
+#else
+ check(delete Object.prototype.toString);
+ check_equals(typeof(s.toString), 'undefined');
+#endif
+Object.prototype.toString = ObjectProtoToStringBackup;
+String.prototype.toString = StringProtoToStringBackup;
+




reply via email to

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