[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-ming.all opcode_guard_test.c
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash/testsuite/misc-ming.all opcode_guard_test.c |
Date: |
Thu, 27 Sep 2007 05:29:35 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/09/27 05:29:35
Modified files:
testsuite/misc-ming.all: opcode_guard_test.c
Log message:
more tests about child clip.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/opcode_guard_test.c?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: opcode_guard_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/opcode_guard_test.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- opcode_guard_test.c 27 Sep 2007 04:44:02 -0000 1.2
+++ opcode_guard_test.c 27 Sep 2007 05:29:35 -0000 1.3
@@ -34,8 +34,8 @@
main(int argc, char** argv)
{
SWFMovie mo;
- SWFMovieClip mc1, mc2, mc3, dejagnuclip;
- SWFDisplayItem it1, it2, it3;
+ SWFMovieClip mc1, mc11, mc2, mc3, dejagnuclip;
+ SWFDisplayItem it1, it11, it2, it3;
const char *srcdir=".";
if ( argc>1 )
@@ -55,10 +55,16 @@
SWFMovie_add(mo, (SWFBlock)dejagnuclip);
SWFMovie_nextFrame(mo); // 1st frame
+ mc11 = newSWFMovieClip();
+ SWFMovieClip_nextFrame(mc11);
mc1 = newSWFMovieClip();
// should not be executed.
add_clip_actions(mc1, "_root.xcheck(false);");
+ // add child movieclip
+ it11 = SWFMovieClip_add(mc1, (SWFBlock)mc11);
+ SWFDisplayItem_setDepth(it11, 1);
+ SWFDisplayItem_setName(it11, "mc11");
SWFMovieClip_nextFrame(mc1);
@@ -68,8 +74,12 @@
/* Define Construct ClipEvent */
SWFDisplayItem_addAction(it1,
compileSWFActionCode(" _root.note('mc1 Construct called');"
+ // test child movieclip has been constructed(no
unload handler defined).
+ " _root.check_equals(typeof(_root.mc1.mc11),
'movieclip');"
" _root.gotoAndPlay(3); "
- " _root.testvar1 = 'executed'; "),
+ " _root.testvar1 = 'executed'; "
+ // test child movieclip has been destroyed.
+ " _root.check_equals(typeof(_root.mc1.mc11),
'undefined');"),
SWFACTION_CONSTRUCT);
/* Define Load ClipEvent */
SWFDisplayItem_addAction(it1,
@@ -81,7 +91,9 @@
SWFDisplayItem_addAction(it1,
compileSWFActionCode(" _root.note('mc1 Unload called'); "
" _root.gotoAndPlay(3); "
- " _root.testvar3 = 'executed'; "),
+ " _root.testvar3 = 'executed'; "
+ // test child movieclip has been destroyed(no unload
handler defined)
+ " _root.check_equals(typeof(_root.mc1.mc11),
'undefined');"),
SWFACTION_UNLOAD);
/* Define EnterFrame ClipEvent */
SWFDisplayItem_addAction(it1,