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 000000000000..28b7ab81d88d Binary files /dev/null and b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.fla differ diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.swf b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.swf new file mode 100644 index 000000000000..187c272b8c13 Binary files /dev/null and b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.swf differ diff --git a/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.toml b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.toml new file mode 100644 index 000000000000..a2e3b9f9cf5f --- /dev/null +++ b/tests/tests/swfs/avm2/swf_9_goto_in_enter_frame_simple/test.toml @@ -0,0 +1 @@ +num_ticks = 3 \ No newline at end of file