diff --git a/tests/tests/regression_tests.rs b/tests/tests/regression_tests.rs index 3c7a40e96d32..85d7a0d03d53 100644 --- a/tests/tests/regression_tests.rs +++ b/tests/tests/regression_tests.rs @@ -715,7 +715,10 @@ swf_tests! { (string_ops_swf6, "avm1/string_ops_swf6", 1), (swf4_bool, "avm1/swf4_bool", 1), (swf5_encoding, "avm1/swf5_encoding", 1), + (swf5_no_closure, "avm1/swf5_no_closure", 1), + (swf5_to_6_cross_call, "avm1/swf5_to_6_cross_call", 2), (swf6_case_insensitive, "avm1/swf6_case_insensitive", 1), + (swf6_to_5_cross_call, "avm1/swf6_to_5_cross_call", 2), (swf7_case_sensitive, "avm1/swf7_case_sensitive", 1), (target_clip_removed, "avm1/target_clip_removed", 1), (target_clip_swf5, "avm1/target_clip_swf5", 2), diff --git a/tests/tests/swfs/avm1/swf5_no_closure/output.txt b/tests/tests/swfs/avm1/swf5_no_closure/output.txt new file mode 100644 index 000000000000..88f7d81edf24 --- /dev/null +++ b/tests/tests/swfs/avm1/swf5_no_closure/output.txt @@ -0,0 +1,20 @@ +g() this: _level0 +g() _target: / +g() foo: root + +root foo: +g + +clip g(): +g() this: _level0.clip +g() _target: /clip +g() foo: clip foo + +clip foo: +g + +object g(): +g() this: [object Object] +g() _target: / +g() foo: g + diff --git a/tests/tests/swfs/avm1/swf5_no_closure/test.fla b/tests/tests/swfs/avm1/swf5_no_closure/test.fla new file mode 100644 index 000000000000..618886a3cc9c Binary files /dev/null and b/tests/tests/swfs/avm1/swf5_no_closure/test.fla differ diff --git a/tests/tests/swfs/avm1/swf5_no_closure/test.swf b/tests/tests/swfs/avm1/swf5_no_closure/test.swf new file mode 100644 index 000000000000..320a5e311555 Binary files /dev/null and b/tests/tests/swfs/avm1/swf5_no_closure/test.swf differ diff --git a/tests/tests/swfs/avm1/swf5_to_6_cross_call/child.fla b/tests/tests/swfs/avm1/swf5_to_6_cross_call/child.fla new file mode 100644 index 000000000000..5e78f82d9b93 Binary files /dev/null and b/tests/tests/swfs/avm1/swf5_to_6_cross_call/child.fla differ diff --git a/tests/tests/swfs/avm1/swf5_to_6_cross_call/child.swf b/tests/tests/swfs/avm1/swf5_to_6_cross_call/child.swf new file mode 100644 index 000000000000..d88c2c6f5aad Binary files /dev/null and b/tests/tests/swfs/avm1/swf5_to_6_cross_call/child.swf differ diff --git a/tests/tests/swfs/avm1/swf5_to_6_cross_call/output.txt b/tests/tests/swfs/avm1/swf5_to_6_cross_call/output.txt new file mode 100644 index 000000000000..889529394654 --- /dev/null +++ b/tests/tests/swfs/avm1/swf5_to_6_cross_call/output.txt @@ -0,0 +1,30 @@ +child f(): + this: _level0.clip + _target: /clip + getDepth: [type Function] + foo: child foo + +child obj toString: + this: object + _target: /clip + getDepth: [type Function] + foo: child foo + +clip.f(): + this: _level0.clip + _target: /clip + getDepth: [type Function] + foo: child foo + +_root f(): + this: object + _target: / + getDepth: + foo: + +root obj toString: + this: object + _target: /clip + getDepth: [type Function] + foo: child foo + diff --git a/tests/tests/swfs/avm1/swf5_to_6_cross_call/test.fla b/tests/tests/swfs/avm1/swf5_to_6_cross_call/test.fla new file mode 100644 index 000000000000..242fadaec6e3 Binary files /dev/null and b/tests/tests/swfs/avm1/swf5_to_6_cross_call/test.fla differ diff --git a/tests/tests/swfs/avm1/swf5_to_6_cross_call/test.swf b/tests/tests/swfs/avm1/swf5_to_6_cross_call/test.swf new file mode 100644 index 000000000000..515b14cdef5d Binary files /dev/null and b/tests/tests/swfs/avm1/swf5_to_6_cross_call/test.swf differ diff --git a/tests/tests/swfs/avm1/swf6_to_5_cross_call/child.fla b/tests/tests/swfs/avm1/swf6_to_5_cross_call/child.fla new file mode 100644 index 000000000000..533aef8c4131 Binary files /dev/null and b/tests/tests/swfs/avm1/swf6_to_5_cross_call/child.fla differ diff --git a/tests/tests/swfs/avm1/swf6_to_5_cross_call/child.swf b/tests/tests/swfs/avm1/swf6_to_5_cross_call/child.swf new file mode 100644 index 000000000000..6e30d086c8e4 Binary files /dev/null and b/tests/tests/swfs/avm1/swf6_to_5_cross_call/child.swf differ diff --git a/tests/tests/swfs/avm1/swf6_to_5_cross_call/output.txt b/tests/tests/swfs/avm1/swf6_to_5_cross_call/output.txt new file mode 100644 index 000000000000..123f4931dd6f --- /dev/null +++ b/tests/tests/swfs/avm1/swf6_to_5_cross_call/output.txt @@ -0,0 +1,30 @@ +child f(): + this: _level0.clip + _target: /clip + getDepth: + foo: child foo + +child obj toString: + this: object + _target: /clip + getDepth: + foo: child foo + +clip.f(): + this: _level0.clip + _target: /clip + getDepth: + foo: child foo + +_root f(): + this: object + _target: /clip + getDepth: + foo: child foo + +root obj toString: + this: object + _target: /clip + getDepth: + foo: child foo + diff --git a/tests/tests/swfs/avm1/swf6_to_5_cross_call/test.fla b/tests/tests/swfs/avm1/swf6_to_5_cross_call/test.fla new file mode 100644 index 000000000000..8f1cf7bac008 Binary files /dev/null and b/tests/tests/swfs/avm1/swf6_to_5_cross_call/test.fla differ diff --git a/tests/tests/swfs/avm1/swf6_to_5_cross_call/test.swf b/tests/tests/swfs/avm1/swf6_to_5_cross_call/test.swf new file mode 100644 index 000000000000..fa10942f5117 Binary files /dev/null and b/tests/tests/swfs/avm1/swf6_to_5_cross_call/test.swf differ