From 8aec2f17037506d9d8ecf36cbc4908a061652daf Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 14 Aug 2023 19:28:25 -0400 Subject: [PATCH] Add another test --- .../avm2/swf_9_goto_in_enter_frame/test.toml | 1 + .../MyChild.as | 20 ++++++++++ .../MyContainer.as | 36 ++++++++++++++++++ .../MyOtherChild.as | 27 +++++++++++++ .../swf_9_goto_in_enter_frame_simple/Test.as | 19 +++++++++ .../output.txt | 15 ++++++++ .../swf_9_goto_in_enter_frame_simple/test.fla | Bin 0 -> 6146 bytes .../swf_9_goto_in_enter_frame_simple/test.swf | Bin 0 -> 1508 bytes .../test.toml | 1 + 9 files changed, 119 insertions(+) create mode 100755 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyChild.as create mode 100755 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyContainer.as create mode 100755 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyOtherChild.as create mode 100755 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/Test.as create mode 100644 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/output.txt create mode 100755 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.fla create mode 100644 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.swf create mode 100644 tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.toml diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame/test.toml b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame/test.toml index 99142b5c1359..f0ce23111194 100644 --- a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame/test.toml +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame/test.toml @@ -1 +1,2 @@ num_ticks = 3 +known_failure = true \ No newline at end of file diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyChild.as b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyChild.as new file mode 100755 index 000000000000..b5c5c02bacab --- /dev/null +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyChild.as @@ -0,0 +1,20 @@ +package { + + import flash.display.MovieClip; + + + public class MyChild extends MovieClip { + + + public function MyChild() { + this.addFrameScript(0, function() { + trace("MyChild framescript 0"); + }); + this.addFrameScript(1, function() { + trace("MyChild framescript 1"); + }); + super(); + } + } + +} diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyContainer.as b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyContainer.as new file mode 100755 index 000000000000..19ee5f6ede85 --- /dev/null +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyContainer.as @@ -0,0 +1,36 @@ +package { + + import flash.display.MovieClip; + import flash.events.MouseEvent; + import flash.utils.setTimeout; + + + public class MyContainer extends MovieClip { + + + public function MyContainer() { + var self = this; + addFrameScript(0,function():* + { + trace("MyContainer framescript 0"); + }); + addFrameScript(1,function():* + { + trace("MyContainer framescript 1"); + }); + super(); + addEventListener("enterFrame",function():* + { + trace("MyContainer enterFrame"); + trace("Before MyContainer.gotoAndStop(2)"); + self.gotoAndStop(2); + trace("After MyContainer.gotoAndStop(2)"); + }); + addEventListener("frameConstructed",function():* + { + trace("MyContainer frameConstructed"); + }); + } + } + +} diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyOtherChild.as b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyOtherChild.as new file mode 100755 index 000000000000..4a6b76be750a --- /dev/null +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/MyOtherChild.as @@ -0,0 +1,27 @@ +package { + + import flash.display.MovieClip; + import flash.events.Event; + + + public class MyOtherChild extends MovieClip { + + + public function MyOtherChild() { + this.addEventListener(Event.ENTER_FRAME, this.onEnterFrame); + this.addEventListener(Event.FRAME_CONSTRUCTED, this.onFrameConstructed); + trace("Calling MyOtherChild super()") + super(); + trace("Called MyOtherChild super()"); + } + + private function onEnterFrame(e) { + trace("MyOtherChild onEnterFrame"); + } + + private function onFrameConstructed(e) { + trace("MyOtherChild onFrameConstructed"); + } + } + +} diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/Test.as b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/Test.as new file mode 100755 index 000000000000..089c779a93f5 --- /dev/null +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/Test.as @@ -0,0 +1,19 @@ +package { + + import flash.display.MovieClip; + + + public class Test extends MovieClip { + + public function Test() + { + trace("Constructing Test"); + var self = this; + this.addFrameScript(1, function() { + trace("Stopping Test at frame 2"); + self.stop(); + }) + } + } + +} diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/output.txt b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/output.txt new file mode 100644 index 000000000000..5f00d8f274cb --- /dev/null +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/output.txt @@ -0,0 +1,15 @@ +Constructing Test +Calling MyOtherChild super() +Called MyOtherChild super() +MyContainer frameConstructed +MyOtherChild onFrameConstructed +Stopping Test at frame 2 +MyContainer framescript 0 +MyContainer enterFrame +Before MyContainer.gotoAndStop(2) +After MyContainer.gotoAndStop(2) +MyOtherChild onEnterFrame +MyContainer frameConstructed +MyOtherChild onFrameConstructed +MyContainer framescript 1 +MyChild framescript 0 diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.fla b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.fla new file mode 100755 index 0000000000000000000000000000000000000000..28b7ab81d88da16ed30f37a007795a9829478217 GIT binary patch literal 6146 zcmbVQbyQT__aC}@h@n$D2MIxt4(S>YkdUF7AqJ$8kP-wX6htJ22ht*4(%s!90#Yhn zzv1h%-txUaetX@$?z#8wz3*P@oU_kof3$9+p#uQ`Yycp}2LnP!V1*A zmX3CAwg{+`v!ewvk-y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