CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai <zoulunkai> 07/09/29 03:27:57
Modified files: . : ChangeLog testsuite/actionscript.all: with.as Log message: * testsuite/actionscript.all/with.as: more tests for setTarget and found the Dejagnu clip functions might be out of scope chain, and explicitly targeting also not work. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4468&r2=1.4469 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/with.as?cvsroot=gnash&r1=1.14&r2=1.15 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4468 retrieving revision 1.4469 diff -u -b -r1.4468 -r1.4469 --- ChangeLog 28 Sep 2007 16:12:26 -0000 1.4468 +++ ChangeLog 29 Sep 2007 03:27:56 -0000 1.4469 @@ -1,3 +1,9 @@ +2007-09-29 Zou Lunkai <[EMAIL PROTECTED]> + + * testsuite/actionscript.all/with.as: more tests for setTarget and found + the Dejagnu clip functions might be out of scope chain, and explicitly + targeting also not work. + 2007-09-28 Sandro Santilli <[EMAIL PROTECTED]> * libbase/rc.cpp: use fprintf rather then log_XXX during parsing. Index: testsuite/actionscript.all/with.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/with.as,v retrieving revision 1.14 retrieving revision 1.15 diff -u -b -r1.14 -r1.15 --- testsuite/actionscript.all/with.as 27 Sep 2007 09:09:43 -0000 1.14 +++ testsuite/actionscript.all/with.as 29 Sep 2007 03:27:57 -0000 1.15 @@ -21,7 +21,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: with.as,v 1.14 2007/09/27 09:09:43 zoulunkai Exp $"; +rcsid="$Id: with.as,v 1.15 2007/09/29 03:27:57 zoulunkai Exp $"; #include "check.as" @@ -226,14 +226,84 @@ // -// tests of setTarget +// test ActionSetTarget and ActionSetTarget2 // -tellTarget("mc1"); -// setTarget and With won't change this context. -// but the deduction might be incorrect!!! -check_equals(this, _root); -tellTarget(""); -// Ming thinks tellTarget is a Function, but it is not. -// So all related tests are probably bogus. -check_equals(typeof(tellTarget), 'undefined'); -check_equals(this, _root); +#if OUTPUT_VERSION > 5 + +// create _root.clip1.clip2 +_root.createEmptyMovieClip("clip1", 101); +clip1.createEmptyMovieClip("clip2", 102); +check_equals(typeof(clip1.clip2),'movieclip'); + +clip1.testvar = 'clip1_var'; +clip1.clip2.testvar = 'clip2_var'; +testvar = '_root_timeline_var'; +_global.testvar = 'global_var'; + +testvar2 = '_root_timeline_var'; +_global.testvar2 = 'global_var'; + +testvar3 = '_root_timeline_var'; + + +// Quick Dejagnu hack for setTarget +// After setTarget, those function are hidden. +// Calling _root.check is also not appropriate at the moment. +// TODO: find a better way to fix Dejagnu +_global.pass_check = pass_check; +_global.fail_check = fail_check; +_global.xpass_check = xpass_check; +_global.xfail_check = xfail_check; + +setTarget('/clip1'); //tag 0x8B + xcheck_equals(this, _level0); + check_equals(testvar, 'clip1_var'); + // won't search timeline properties, different with ActionWith + check_equals(testvar2, 'global_var'); + check_equals(testvar3, undefined); +setTarget(""); + +setTarget('/clip1/clip2'); //tag 0x8B + xcheck_equals(this, _level0); + check_equals(testvar, 'clip2_var'); + check_equals(testvar2, 'global_var'); +setTarget(""); + +// first understand getproperty +asm{ + push 'checkpoint' + push '' + push 11 //_target + getproperty + setvariable +}; +check_equals(checkpoint, '/'); + +// then see how _target is affected. +setTarget("/clip1"); + asm{ + push 'checkpoint' + push '' + push 11 //_target + getproperty + setvariable + }; + check_equals(checkpoint, '/clip1'); +setTarget(""); + +setTarget("/clip1/clip2"); + asm{ + push 'checkpoint' + push '' + push 11 + getproperty //_target + setvariable + }; + check_equals(checkpoint, '/clip1/clip2'); +setTarget(""); + +// +// TODO: add tests for setTargetExpression +// +#endif //OUTPUT_VERSION > 5 + _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit