From fe4e180adfafa98229c9eed0ef1f76bcbd4843e3 Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Fri, 17 May 2024 01:14:23 +0200 Subject: [PATCH] tests: Add attach_movie_stop test This test verifies that stop() works properly for a movie clip attached with attachMovie in DoInitAction. --- .../tests/swfs/avm1/attach_movie_stop/asset_1.as | 3 +++ .../tests/swfs/avm1/attach_movie_stop/asset_2.as | 1 + .../tests/swfs/avm1/attach_movie_stop/output.txt | 3 +++ tests/tests/swfs/avm1/attach_movie_stop/test.as | 2 ++ tests/tests/swfs/avm1/attach_movie_stop/test.swf | Bin 0 -> 219 bytes tests/tests/swfs/avm1/attach_movie_stop/test.toml | 1 + 6 files changed, 10 insertions(+) create mode 100644 tests/tests/swfs/avm1/attach_movie_stop/asset_1.as create mode 100644 tests/tests/swfs/avm1/attach_movie_stop/asset_2.as create mode 100644 tests/tests/swfs/avm1/attach_movie_stop/output.txt create mode 100644 tests/tests/swfs/avm1/attach_movie_stop/test.as create mode 100644 tests/tests/swfs/avm1/attach_movie_stop/test.swf create mode 100644 tests/tests/swfs/avm1/attach_movie_stop/test.toml diff --git a/tests/tests/swfs/avm1/attach_movie_stop/asset_1.as b/tests/tests/swfs/avm1/attach_movie_stop/asset_1.as new file mode 100644 index 000000000000..3b51421ad4f8 --- /dev/null +++ b/tests/tests/swfs/avm1/attach_movie_stop/asset_1.as @@ -0,0 +1,3 @@ +trace("Before stop"); +stop(); +trace("After stop"); diff --git a/tests/tests/swfs/avm1/attach_movie_stop/asset_2.as b/tests/tests/swfs/avm1/attach_movie_stop/asset_2.as new file mode 100644 index 000000000000..1038b8495e07 --- /dev/null +++ b/tests/tests/swfs/avm1/attach_movie_stop/asset_2.as @@ -0,0 +1 @@ +trace("Second frame, I shouldn\'t be executed!"); diff --git a/tests/tests/swfs/avm1/attach_movie_stop/output.txt b/tests/tests/swfs/avm1/attach_movie_stop/output.txt new file mode 100644 index 000000000000..40a5be5c9cab --- /dev/null +++ b/tests/tests/swfs/avm1/attach_movie_stop/output.txt @@ -0,0 +1,3 @@ +Attaching asset +Before stop +After stop diff --git a/tests/tests/swfs/avm1/attach_movie_stop/test.as b/tests/tests/swfs/avm1/attach_movie_stop/test.as new file mode 100644 index 000000000000..bacb80d482a1 --- /dev/null +++ b/tests/tests/swfs/avm1/attach_movie_stop/test.as @@ -0,0 +1,2 @@ +trace("Attaching"); +attachMovie("Test", "test", 30); diff --git a/tests/tests/swfs/avm1/attach_movie_stop/test.swf b/tests/tests/swfs/avm1/attach_movie_stop/test.swf new file mode 100644 index 0000000000000000000000000000000000000000..038490d66809c23556a58dc5eec2c3b74710a74d GIT binary patch literal 219 zcmV<103`oIS5pWX0RRAaoJEc?Zo)tiMZb4J4vi5NqCuO6C=nIZNEm1+sFFT%>~XLJ zUgRARNAL-#bC}!<#>RpvX1+%M&7U*c-$3^d@Dx@(NG;V>s*{QIpzxu~fs6&Ewjkr! z9uTHX#a&($UNG{j;f*lIRG069eNt@m#H2;Er?FWZx3$MzlE1O}Awy@1k4(vHLkkuJ zo={)pICPE}{~aaq*Fb)g>~ew@LgpymX8Es)Y70NiPb{iE8+*#AxqWHFAIg#X!K$fh VqnnMM^(EZbWtHZO1a2sCK5-HfXmkJo literal 0 HcmV?d00001 diff --git a/tests/tests/swfs/avm1/attach_movie_stop/test.toml b/tests/tests/swfs/avm1/attach_movie_stop/test.toml new file mode 100644 index 000000000000..568cadba535f --- /dev/null +++ b/tests/tests/swfs/avm1/attach_movie_stop/test.toml @@ -0,0 +1 @@ +num_ticks = 2