[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-ming.all place_object_test2.c
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash/testsuite/misc-ming.all place_object_test2.c |
Date: |
Fri, 14 Dec 2007 03:00:54 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/12/14 03:00:53
Modified files:
testsuite/misc-ming.all: place_object_test2.c
Log message:
add test for multiple event handlers sharing the same action buffer.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_object_test2.c?cvsroot=gnash&r1=1.5&r2=1.6
Patches:
Index: place_object_test2.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/place_object_test2.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- place_object_test2.c 31 Jul 2007 04:01:33 -0000 1.5
+++ place_object_test2.c 14 Dec 2007 03:00:53 -0000 1.6
@@ -60,6 +60,7 @@
dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 0,
800, 600);
SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+ add_actions(mo, "testvar1 = 0; testvar2 = 0;");
SWFMovie_nextFrame(mo); // frame1
//
@@ -84,10 +85,16 @@
it1 = SWFMovie_add(mo, (SWFBlock)mc1);
SWFDisplayItem_setDepth(it1, 3);
SWFDisplayItem_setName(it1, "static_mc1");
+ SWFDisplayItem_addAction(it1,
+ newSWFAction(" _root.testvar1++; trace(this); trace(_root.testvar1); "),
+ SWFACTION_INIT | SWFACTION_CONSTRUCT | SWFACTION_ONLOAD);
it2 = SWFMovie_add(mo, (SWFBlock)mc2);
SWFDisplayItem_setDepth(it2, 3);
SWFDisplayItem_setName(it2, "static_mc2");
+ SWFDisplayItem_addAction(it2,
+ newSWFAction(" _root.testvar2++; trace(this); trace(_root.testvar2); "),
+ SWFACTION_INIT | SWFACTION_CONSTRUCT | SWFACTION_ONLOAD);
check_equals(mo, "typeof(static_mc1)", "'movieclip'");
if(OUTPUT_VERSION > 5)
@@ -102,6 +109,18 @@
}
SWFMovie_nextFrame(mo); // frame3
+ if(OUTPUT_VERSION > 5)
+ {
+ check_equals(mo, "testvar1", "3");
+ check_equals(mo, "testvar2", "0");
+ }
+ else
+ {
+ // swf5 does not support CONSTRUCT event
+ check_equals(mo, "testvar1", "2");
+ check_equals(mo, "testvar2", "2");
+ }
+
//
// Place mc2 at depth 3 again.
// Observed behaviour: no new character gets created
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/testsuite/misc-ming.all place_object_test2.c,
Zou Lunkai <=