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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Text...
Date: Wed, 19 Dec 2007 16:38:49 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/19 16:38:49

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

Log message:
        add tests for TextField soft references (unimplemented in Gnash).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5218&r2=1.5219
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/TextField.as?cvsroot=gnash&r1=1.36&r2=1.37

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5218
retrieving revision 1.5219
diff -u -b -r1.5218 -r1.5219
--- ChangeLog   19 Dec 2007 09:40:53 -0000      1.5218
+++ ChangeLog   19 Dec 2007 16:38:48 -0000      1.5219
@@ -1,5 +1,10 @@
 2007-12-18 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/TextField.as: add tests for
+         TextField soft references (unimplemented in Gnash).
+
+2007-12-18 Sandro Santilli <address@hidden>
+
        * server/edit_text_character.cpp: implement getDepth()
        * server/sprite_instance.cpp make createTextField more
          tolerant and correct about parameters.

Index: testsuite/actionscript.all/TextField.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/TextField.as,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- testsuite/actionscript.all/TextField.as     19 Dec 2007 09:40:54 -0000      
1.36
+++ testsuite/actionscript.all/TextField.as     19 Dec 2007 16:38:49 -0000      
1.37
@@ -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: TextField.as,v 1.36 2007/12/19 09:40:54 strk Exp $";
+rcsid="$Id: TextField.as,v 1.37 2007/12/19 16:38:49 strk Exp $";
 
 #include "check.as"
 
@@ -590,8 +590,38 @@
 //-------------------------------------------------------------------------
 
 //-------------------------------------------------------------------------
-// TODO: check TextField.removeTextField (and soft references?)
+// Check TextField.removeTextField and soft references
 //-------------------------------------------------------------------------
+//
+// TextField as_value references are soft references like MovieClip ones.
+// Till the ref is not danglign, typeof(ref) will return 'object', once
+// the ref is dangling it will return 'movieclip' and will successfully 
+// rebind to a real MovieClip ! When rebound, typeof(ref) will return 'object'
+// or 'movieclip' depending on the bound thing.
+//
+//-------------------------------------------------------------------------
+
+createTextField("hardref", 23, 10, 10, 160, 200);
+hardref.prop = 5;
+softref = hardref;
+check_equals(typeof(hardref), 'object');
+check_equals(typeof(softref), 'object');
+check_equals(softref.prop, 5);
+check_equals(softref.getDepth(), 23);
+hardref.removeTextField();
+xcheck_equals(typeof(hardref), 'undefined');
+xcheck_equals(typeof(softref), 'movieclip'); // becomes a movieclip ??
+xcheck_equals(typeof(softref.prop), 'undefined');
+createEmptyMovieClip("hardref", 24);
+xcheck_equals(typeof(hardref), 'movieclip');
+hardref.prop = 7;
+xcheck_equals(typeof(softref), 'movieclip');
+check_equals(softref.prop, 7);
+hardref.removeMovieClip();
+createTextField("hardref", 25, 10, 10, 160, 200);
+hardref.prop = 9;
+check_equals(typeof(softref), 'object'); // changes type on rebind
+check_equals(softref.prop, 9);
 
 
 //-------------------------------------------------------------------------
@@ -778,9 +808,9 @@
 
 
 #if OUTPUT_VERSION < 8
- check_totals(371);
+ check_totals(383);
 #else
- check_totals(372);
+ check_totals(384);
 #endif
 
 #else // OUTPUT_VERSION <= 5




reply via email to

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