diff --git a/tests/tests/swfs/avm1/from_shumway/array/output.txt b/tests/tests/swfs/avm1/from_shumway/array/output.txt new file mode 100644 index 000000000..46f75a05a --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/array/output.txt @@ -0,0 +1,7 @@ +concat: a,1,b,[object Object] +pop: b undefined +push: 2 c 2 +shift: a b +slice: b true +splice1: b true 2 c +splice2: true 4 d c diff --git a/tests/tests/swfs/avm1/from_shumway/array/test.fla b/tests/tests/swfs/avm1/from_shumway/array/test.fla new file mode 100644 index 000000000..233f990f3 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/array/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/array/test.swf b/tests/tests/swfs/avm1/from_shumway/array/test.swf new file mode 100644 index 000000000..f347cc424 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/array/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/array/test.toml b/tests/tests/swfs/avm1/from_shumway/array/test.toml new file mode 100644 index 000000000..b46aa054f --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/array/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/array + +num_frames = 1 +ignore = true # https://github.com/ruffle-rs/ruffle/issues/12269 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/output.txt b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/output.txt new file mode 100644 index 000000000..e8c133fc5 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/output.txt @@ -0,0 +1,2 @@ +255 +true diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.fla b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.fla new file mode 100644 index 000000000..6a7769fb0 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.swf b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.swf new file mode 100644 index 000000000..d7604c7c4 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.toml b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.toml new file mode 100644 index 000000000..c3a7f3324 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/bitmapdata/getpixel/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/bitmapdata + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/output.txt b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/output.txt new file mode 100644 index 000000000..34917918f --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/output.txt @@ -0,0 +1,3 @@ +1 +1 +(x=0, y=0, w=1, h=1) diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.fla b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.fla new file mode 100644 index 000000000..b1e80327a Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.swf b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.swf new file mode 100644 index 000000000..22e1407cd Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.toml b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.toml new file mode 100644 index 000000000..c3a7f3324 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/bitmapdata/loadbitmap/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/bitmapdata + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/callee/output.txt b/tests/tests/swfs/avm1/from_shumway/callee/output.txt new file mode 100644 index 000000000..b9aa47b0e --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/callee/output.txt @@ -0,0 +1,2 @@ +callee = f1: true +caller = f2: true diff --git a/tests/tests/swfs/avm1/from_shumway/callee/test.fla b/tests/tests/swfs/avm1/from_shumway/callee/test.fla new file mode 100644 index 000000000..3b0e7eb5e Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/callee/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/callee/test.swf b/tests/tests/swfs/avm1/from_shumway/callee/test.swf new file mode 100644 index 000000000..db09d997f Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/callee/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/callee/test.toml b/tests/tests/swfs/avm1/from_shumway/callee/test.toml new file mode 100644 index 000000000..9923357ac --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/callee/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/callee + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/depth/output.txt b/tests/tests/swfs/avm1/from_shumway/depth/output.txt new file mode 100644 index 000000000..ac03f6191 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/depth/output.txt @@ -0,0 +1,6 @@ +getNextHighestDepth before 0 +getNextHighestDepth after 2 +-16383 t1 -16383 +-16381 t2 -16381 +0 s1 0 +1 s2 1 diff --git a/tests/tests/swfs/avm1/from_shumway/depth/test.fla b/tests/tests/swfs/avm1/from_shumway/depth/test.fla new file mode 100644 index 000000000..176e1db02 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/depth/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/depth/test.swf b/tests/tests/swfs/avm1/from_shumway/depth/test.swf new file mode 100644 index 000000000..09598d5fd Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/depth/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/depth/test.toml b/tests/tests/swfs/avm1/from_shumway/depth/test.toml new file mode 100644 index 000000000..a5fc65ec0 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/depth/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/depth + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/output.txt b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/output.txt new file mode 100644 index 000000000..bac428625 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/output.txt @@ -0,0 +1,7 @@ +root1 +sym1: _level0.sym1 +test1: undefined +sym1 +root2 +sym1: _level0.sym1 +test2: hello diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.swf b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.swf new file mode 100644 index 000000000..b01557536 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.toml b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.toml new file mode 100644 index 000000000..accda67b5 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/doactionorder + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.xml b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.xml new file mode 100644 index 000000000..2fc8da576 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/doactionorder/doactionorder/test.xml @@ -0,0 +1,330 @@ + + +
+ + + + + + + Adobe Flash Professional CS6 - build 537 2015-04-28T13:11:50-05:00 2015-04-28T13:35:05-05:00 2015-04-28T13:35:05-05:00 application/x-shockwave-flash xmp.iid:CAAB283ED5EDE41185DF942595CE2973 xmp.did:CAAB283ED5EDE41185DF942595CE2973 xmp.did:550A6EC8BDEDE41185DF942595CE2973 xmp.iid:550A6EC8BDEDE41185DF942595CE2973 xmp.did:550A6EC8BDEDE41185DF942595CE2973 xmp.did:550A6EC8BDEDE41185DF942595CE2973 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/output.txt b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/output.txt new file mode 100644 index 000000000..a0abc7fd1 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/output.txt @@ -0,0 +1,4 @@ +Class1 constructed +timeline +_level0.test1 +test function called diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/symbolclass_as/Class1.as b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/symbolclass_as/Class1.as new file mode 100644 index 000000000..d1752be8f --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/symbolclass_as/Class1.as @@ -0,0 +1,9 @@ +dynamic class Class1 extends MovieClip { + function Class1() { + trace('Class1 constructed'); + } + + function test() { + trace('test function called'); + } +} \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.fla b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.fla new file mode 100644 index 000000000..0b2d085b7 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.swf b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.swf new file mode 100644 index 000000000..103a93f63 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.toml b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.toml new file mode 100644 index 000000000..accda67b5 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/doactionorder/symbolclass/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/doactionorder + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/output.txt b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/output.txt new file mode 100644 index 000000000..98f231569 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/output.txt @@ -0,0 +1,6 @@ +_level0.test +_level0.test1 +_level0.test2 +_level0.test +_level0.test1 +undefined diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.fla b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.fla new file mode 100644 index 000000000..05b846ea9 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.swf b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.swf new file mode 100644 index 000000000..6b4cdf0c5 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.toml b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.toml new file mode 100644 index 000000000..1e9bd1247 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/dontremove/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/duplicatemovieclip + +num_frames = 4 +ignore = true # https://github.com/ruffle-rs/ruffle/issues/12270 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/output.txt b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/output.txt new file mode 100644 index 000000000..a9242db4e --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/output.txt @@ -0,0 +1,4 @@ +clone +51 +50 +100 diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.fla b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.fla new file mode 100644 index 000000000..e805a951b Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.swf b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.swf new file mode 100644 index 000000000..f5ab7a423 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.toml b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.toml new file mode 100644 index 000000000..ca3be30b9 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/duplicatemovieclip/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/duplicatemovieclip + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/output.txt b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/output.txt new file mode 100644 index 000000000..b979d62f4 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/output.txt @@ -0,0 +1,3 @@ +true +true +true diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.fla b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.fla new file mode 100644 index 000000000..cdb49acef Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.swf b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.swf new file mode 100644 index 000000000..7a97de979 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.toml b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.toml new file mode 100644 index 000000000..7794f9ff9 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/name_coercion/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/duplicatemovieclip + +num_frames = 1 +ignore = true # https://github.com/ruffle-rs/ruffle/issues/12271 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/output.txt b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/output.txt new file mode 100644 index 000000000..f6b09018a --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/output.txt @@ -0,0 +1,6 @@ +undefined +_level0.test1 +undefined +_level0.test2 +undefined +undefined diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.fla b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.fla new file mode 100644 index 000000000..4bc5747c9 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.swf b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.swf new file mode 100644 index 000000000..17044a481 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.toml b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.toml new file mode 100644 index 000000000..8ba7e4d24 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/duplicatemovieclip/samedepth/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/duplicatemovieclip + +num_frames = 3 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/externalinterface/output.txt b/tests/tests/swfs/avm1/from_shumway/externalinterface/output.txt new file mode 100644 index 000000000..a146b526d --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/externalinterface/output.txt @@ -0,0 +1,4 @@ +available: undefined +after addCallback +call result: undefined +after call diff --git a/tests/tests/swfs/avm1/from_shumway/externalinterface/test.fla b/tests/tests/swfs/avm1/from_shumway/externalinterface/test.fla new file mode 100644 index 000000000..1f4959bb5 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/externalinterface/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/externalinterface/test.swf b/tests/tests/swfs/avm1/from_shumway/externalinterface/test.swf new file mode 100644 index 000000000..e3caa0a81 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/externalinterface/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/externalinterface/test.toml b/tests/tests/swfs/avm1/from_shumway/externalinterface/test.toml new file mode 100644 index 000000000..97f35072a --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/externalinterface/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/externalinterface + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/filters/output.txt b/tests/tests/swfs/avm1/from_shumway/filters/output.txt new file mode 100644 index 000000000..1eb2b69f7 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/filters/output.txt @@ -0,0 +1,150 @@ +Filters (7) +DropShadowFilter + distance 5 + angle 0 + color 0 + alpha 1 + blurX 5 + blurY 5 + strength 1 + quality 1 + inner false + knockout false + hideObject false +BlurFilter + blurX 5 + blurY 5 + quality 1 +GlowFilter + color 16711680 + alpha 1 + blurX 5 + blurY 5 + strength 1 + quality 1 + inner false + knockout false +BevelFilter + distance 5 + angle 0 + highlightColor 16777215 + highlightAlpha 1 + shadowColor 0 + shadowAlpha 1 + blurX 5 + blurY 5 + strength 1 + quality 1 + type inner + knockout false +GradientGlowFilter + distance 5 + angle 0 + colors 16777215,0 + alphas 0,1 + ratios 0,255 + blurX 5 + blurY 5 + strength 1 + quality 1 + type outer + knockout false +GradientBevelFilter + distance 5 + angle 0 + colors 16777215,16711680,0 + alphas 1,0,1 + ratios 0,128,255 + blurX 5 + blurY 5 + strength 1 + quality 1 + type inner + knockout false +ColorMatrixFilter + matrix 1,0,0,0,50,0,1,0,0,50,0,0,1,0,50,0,0,0,1,0 +Filters (9) +BevelFilter + distance 1 + angle 1 + highlightColor 12 + highlightAlpha 1 + shadowColor 34 + shadowAlpha 1 + blurX 2 + blurY 3 + strength 1 + quality 1 + type inner + knockout false +BlurFilter + blurX 2 + blurY 3 + quality 1 +ColorMatrixFilter + matrix 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0 +ConvolutionFilter + matrixX 3 + matrixY 3 + matrix 1,2,3,4,5,6,7,8,9 + divisor 1 + bias 1 + preserveAlpha false + clamp false + color 123 + alpha 1 +DisplacementMapFilter + mapBitmap [object Object] + mapPoint (x=1, y=2) + componentX 1 + componentY 1 + scaleX 2 + scaleY 2 + mode clamp + color 2 + alpha 1 +DropShadowFilter + distance 2 + angle 1 + color 23 + alpha 1 + blurX 4 + blurY 2 + strength 1 + quality 1 + inner true + knockout true + hideObject false +GlowFilter + color 321 + alpha 1 + blurX 4 + blurY 2 + strength 1 + quality 1 + inner false + knockout false +GradientBevelFilter + distance 2 + angle 1 + colors 23,12,42 + alphas 0,1,1 + ratios 0,25,255 + blurX 5 + blurY 4 + strength 5 + quality 2 + type full + knockout true +GradientGlowFilter + distance 1 + angle 1 + colors 3,4,5 + alphas 1,1,1 + ratios 0,50,255 + blurX 1 + blurY 2 + strength 1 + quality 1 + type inner + knockout false diff --git a/tests/tests/swfs/avm1/from_shumway/filters/test.fla b/tests/tests/swfs/avm1/from_shumway/filters/test.fla new file mode 100644 index 000000000..ef9e6414b Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/filters/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/filters/test.swf b/tests/tests/swfs/avm1/from_shumway/filters/test.swf new file mode 100644 index 000000000..72bc40eda Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/filters/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/filters/test.toml b/tests/tests/swfs/avm1/from_shumway/filters/test.toml new file mode 100644 index 000000000..7cb78c31b --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/filters/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/filters + +num_frames = 1 +ignore = true # https://github.com/ruffle-rs/ruffle/issues/12272 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/output.txt b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/output.txt new file mode 100644 index 000000000..289623bc2 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/output.txt @@ -0,0 +1,2 @@ +0 +Sprite with no ShowFrame diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.swf b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.swf new file mode 100644 index 000000000..62df325a7 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.toml b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.toml new file mode 100644 index 000000000..1a361767e --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/haxe + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.xml b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.xml new file mode 100644 index 000000000..731e60682 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/haxe/flocons1/test.xml @@ -0,0 +1,72 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/output.txt b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/output.txt new file mode 100644 index 000000000..b7a6e835c --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/output.txt @@ -0,0 +1,3 @@ +Test +Test +Done diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.fla b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.fla new file mode 100644 index 000000000..217244823 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.swf b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.swf new file mode 100644 index 000000000..fe517a33b Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.toml b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.toml new file mode 100644 index 000000000..1a361767e --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/haxe/flocons2/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/haxe + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/hitarea/input.json b/tests/tests/swfs/avm1/from_shumway/hitarea/input.json new file mode 100644 index 000000000..4df59e8c6 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/hitarea/input.json @@ -0,0 +1,6 @@ +[ + { + "type": "MouseMove", + "pos": [250.0, 300.0] + } +] \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/hitarea/output.txt b/tests/tests/swfs/avm1/from_shumway/hitarea/output.txt new file mode 100644 index 000000000..e26772bba --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/hitarea/output.txt @@ -0,0 +1,4 @@ +undefined +_level0.hit +rollover +1 diff --git a/tests/tests/swfs/avm1/from_shumway/hitarea/test.fla b/tests/tests/swfs/avm1/from_shumway/hitarea/test.fla new file mode 100644 index 000000000..e81250d63 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/hitarea/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/hitarea/test.swf b/tests/tests/swfs/avm1/from_shumway/hitarea/test.swf new file mode 100644 index 000000000..95af0e575 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/hitarea/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/hitarea/test.toml b/tests/tests/swfs/avm1/from_shumway/hitarea/test.toml new file mode 100644 index 000000000..f4228dc28 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/hitarea/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/hitarea + +num_frames = 7 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/label/output.txt b/tests/tests/swfs/avm1/from_shumway/label/output.txt new file mode 100644 index 000000000..9e23d3c3a --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/label/output.txt @@ -0,0 +1,4 @@ +Frame 1 +Frame 3 +Frame 5 +Frame 6 diff --git a/tests/tests/swfs/avm1/from_shumway/label/test.fla b/tests/tests/swfs/avm1/from_shumway/label/test.fla new file mode 100644 index 000000000..6e58561fb Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/label/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/label/test.swf b/tests/tests/swfs/avm1/from_shumway/label/test.swf new file mode 100644 index 000000000..fede643da Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/label/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/label/test.toml b/tests/tests/swfs/avm1/from_shumway/label/test.toml new file mode 100644 index 000000000..0a1e11a73 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/label/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/label + +num_frames = 7 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/levels/output.txt b/tests/tests/swfs/avm1/from_shumway/levels/output.txt new file mode 100644 index 000000000..f8faa4db9 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/levels/output.txt @@ -0,0 +1,9 @@ +level 0 +true +true +_level0 +level 9 +false +true +true +_level9 diff --git a/tests/tests/swfs/avm1/from_shumway/levels/test.fla b/tests/tests/swfs/avm1/from_shumway/levels/test.fla new file mode 100644 index 000000000..4905bb345 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/levels/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/levels/test.swf b/tests/tests/swfs/avm1/from_shumway/levels/test.swf new file mode 100644 index 000000000..c443c9839 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/levels/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/levels/test.toml b/tests/tests/swfs/avm1/from_shumway/levels/test.toml new file mode 100644 index 000000000..2982ade71 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/levels/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/levels + +num_frames = 2 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/levels/twolevels_sub.fla b/tests/tests/swfs/avm1/from_shumway/levels/twolevels_sub.fla new file mode 100644 index 000000000..d2a4d6c29 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/levels/twolevels_sub.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/levels/twolevels_sub.swf b/tests/tests/swfs/avm1/from_shumway/levels/twolevels_sub.swf new file mode 100644 index 000000000..de4e21f1a Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/levels/twolevels_sub.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadevent/output.txt b/tests/tests/swfs/avm1/from_shumway/loadevent/output.txt new file mode 100644 index 000000000..c024fd9a4 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadevent/output.txt @@ -0,0 +1,9 @@ +start +1b2 +b +1b2c +c +1b3 +b +1b3c +c diff --git a/tests/tests/swfs/avm1/from_shumway/loadevent/test.fla b/tests/tests/swfs/avm1/from_shumway/loadevent/test.fla new file mode 100644 index 000000000..8ab92b77b Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/loadevent/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadevent/test.swf b/tests/tests/swfs/avm1/from_shumway/loadevent/test.swf new file mode 100644 index 000000000..20ef0de29 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/loadevent/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadevent/test.toml b/tests/tests/swfs/avm1/from_shumway/loadevent/test.toml new file mode 100644 index 000000000..c00322efc --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadevent/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/loadevent + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/loadvariables.txt b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/loadvariables.txt new file mode 100644 index 000000000..21031e271 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/loadvariables.txt @@ -0,0 +1 @@ +foo=bar&spaced+var=value&spacedvalue=multi+word&escaped=with%26amp%3Bamp%3B&varsLoaded=1 diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/output.txt b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/output.txt new file mode 100644 index 000000000..be4582741 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/output.txt @@ -0,0 +1,7 @@ +loadVariables completed. Loaded the following vars: +varsLoaded=1 + +escaped=with&amp; +spacedvalue=multi word +spaced var=value +foo=bar diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.fla b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.fla new file mode 100644 index 000000000..10a843111 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.swf b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.swf new file mode 100644 index 000000000..f4f86a262 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.toml b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.toml new file mode 100644 index 000000000..17ed6f78f --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvariables/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/loadvariables + +num_frames = 2 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/loadvars.txt b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/loadvars.txt new file mode 100644 index 000000000..fa7791407 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/loadvars.txt @@ -0,0 +1 @@ +var1=test&var2=test2 diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/output.txt b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/output.txt new file mode 100644 index 000000000..9fe4704d0 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/output.txt @@ -0,0 +1,2 @@ +loaded true +var1: test diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.fla b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.fla new file mode 100644 index 000000000..b128c829b Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.swf b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.swf new file mode 100644 index 000000000..3f7f12aa0 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.toml b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.toml new file mode 100644 index 000000000..17ed6f78f --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/loadvariables/loadvars/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/loadvariables + +num_frames = 2 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/lookup/output.txt b/tests/tests/swfs/avm1/from_shumway/lookup/output.txt new file mode 100644 index 000000000..60c478e78 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/lookup/output.txt @@ -0,0 +1,3 @@ +_root.label1 _root +label1 scope +label1(2) scope diff --git a/tests/tests/swfs/avm1/from_shumway/lookup/test.fla b/tests/tests/swfs/avm1/from_shumway/lookup/test.fla new file mode 100644 index 000000000..0d60e4895 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/lookup/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/lookup/test.swf b/tests/tests/swfs/avm1/from_shumway/lookup/test.swf new file mode 100644 index 000000000..95d0058db Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/lookup/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/lookup/test.toml b/tests/tests/swfs/avm1/from_shumway/lookup/test.toml new file mode 100644 index 000000000..cc1a15aca --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/lookup/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/lookup + +num_frames = 10 +sleep_to_meet_frame_rate = true \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/mouse_transparency/input.json b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/input.json new file mode 100644 index 000000000..2b6a71d01 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/input.json @@ -0,0 +1,19 @@ +[ + { + "type": "Wait" + }, + { + "type": "MouseMove", + "pos": [55.0, 55.0] + }, + { + "type": "MouseDown", + "pos": [55.0, 55.0], + "btn": "Left" + }, + { + "type": "MouseUp", + "pos": [55.0, 55.0], + "btn": "Left" + } +] \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/mouse_transparency/mouse-transparency.stas b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/mouse-transparency.stas new file mode 100644 index 000000000..454c12f3d --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/mouse-transparency.stas @@ -0,0 +1,17 @@ +// mouse-transparency.swf test script + +run_test = function (t, file) { + print ("Testing " + file); + t.reset (file); + var expected = Buffer.load (file + ".trace"); + t.advance (50); + t.mouse_press (55, 55); + t.mouse_release (55, 55); + var diff = t.trace.diff (expected); +}; + +t = new Test (); +for (var i = 0; i < filenames.length; i++) { + run_test (t, filenames[i]); +} + diff --git a/tests/tests/swfs/avm1/from_shumway/mouse_transparency/output.txt b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/output.txt new file mode 100644 index 000000000..d7025695e --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/output.txt @@ -0,0 +1 @@ +release diff --git a/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.fla b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.fla new file mode 100644 index 000000000..c93d2c126 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.swf b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.swf new file mode 100644 index 000000000..c4804f4a7 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.toml b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.toml new file mode 100644 index 000000000..b033533c8 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/mouse_transparency/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/mouse-transparency + +num_frames = 2 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/moviecliploader/loadee.fla b/tests/tests/swfs/avm1/from_shumway/moviecliploader/loadee.fla new file mode 100644 index 000000000..dd433d965 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/moviecliploader/loadee.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/moviecliploader/loadee.swf b/tests/tests/swfs/avm1/from_shumway/moviecliploader/loadee.swf new file mode 100644 index 000000000..b77369501 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/moviecliploader/loadee.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/moviecliploader/output.txt b/tests/tests/swfs/avm1/from_shumway/moviecliploader/output.txt new file mode 100644 index 000000000..4697d7256 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/moviecliploader/output.txt @@ -0,0 +1,7 @@ +loading started +loader frame 2 +onLoadStart _level0.content +onLoadComplete _level0.content +loadee frame 1 +onLoadInit _level0.content +loadee frame 2 diff --git a/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.fla b/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.fla new file mode 100644 index 000000000..46e942335 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.swf b/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.swf new file mode 100644 index 000000000..99931855e Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.toml b/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.toml new file mode 100644 index 000000000..38d5e1ef6 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/moviecliploader/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/moviecliploader + +num_frames = 3 +ignore = true # https://github.com/ruffle-rs/ruffle/issues/12273 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/nativeinheritance/output.txt b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/output.txt new file mode 100644 index 000000000..a48d07765 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/output.txt @@ -0,0 +1,6 @@ +B ctor +B ctor +A ctor +true +true +true diff --git a/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.fla b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.fla new file mode 100644 index 000000000..0f3c4ebcc Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.swf b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.swf new file mode 100644 index 000000000..d7c16ce05 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.toml b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.toml new file mode 100644 index 000000000..9a9252ebf --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/nativeinheritance/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/nativeinheritance + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/nested_button/input.json b/tests/tests/swfs/avm1/from_shumway/nested_button/input.json new file mode 100644 index 000000000..76cf1a1c2 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/nested_button/input.json @@ -0,0 +1,22 @@ +[ + { + "type": "MouseMove", + "pos": [50.0, 40.0] + }, + { + "type": "Wait" + }, + { + "type": "MouseDown", + "pos": [50.0, 40.0], + "btn": "Left" + }, + { + "type": "Wait" + }, + { + "type": "MouseUp", + "pos": [50.0, 40.0], + "btn": "Left" + } +] \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/nested_button/nested-button-click.stas b/tests/tests/swfs/avm1/from_shumway/nested_button/nested-button-click.stas new file mode 100644 index 000000000..2b3e2d1d7 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/nested_button/nested-button-click.stas @@ -0,0 +1,16 @@ +run_test = function (t, file) { + print ("Testing " + file); + t.reset (file); + var expected = Buffer.load (file + ".trace"); + t.mouse_move (50, 40); + t.advance (200); + t.mouse_press (50, 40); + t.advance (200); + t.mouse_release (50, 40); + var diff = t.trace.diff (expected); +}; + +t = new Test (); +for (var i = 0; i < filenames.length; i++) { + run_test (t, filenames[i]); +} diff --git a/tests/tests/swfs/avm1/from_shumway/nested_button/output.txt b/tests/tests/swfs/avm1/from_shumway/nested_button/output.txt new file mode 100644 index 000000000..0a2e1d136 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/nested_button/output.txt @@ -0,0 +1 @@ +button click diff --git a/tests/tests/swfs/avm1/from_shumway/nested_button/test.fla b/tests/tests/swfs/avm1/from_shumway/nested_button/test.fla new file mode 100644 index 000000000..4dfa73e04 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/nested_button/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/nested_button/test.swf b/tests/tests/swfs/avm1/from_shumway/nested_button/test.swf new file mode 100644 index 000000000..47ea60100 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/nested_button/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/nested_button/test.toml b/tests/tests/swfs/avm1/from_shumway/nested_button/test.toml new file mode 100644 index 000000000..845bb23fd --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/nested_button/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/nested_button + +num_frames = 3 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/operations/output.txt b/tests/tests/swfs/avm1/from_shumway/operations/output.txt new file mode 100644 index 000000000..32c3bd1b4 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/operations/output.txt @@ -0,0 +1,13 @@ +false == [object Object]: false +[object Object] == test: false +false == 0: true +1 == true: true +12 == 12: true +0.1 == [object Object]: false +2 == null: false +10 == 10: true +test == [object Object]: false +false == false: true +true == true: true +test == test: false +0 == : false diff --git a/tests/tests/swfs/avm1/from_shumway/operations/test.fla b/tests/tests/swfs/avm1/from_shumway/operations/test.fla new file mode 100644 index 000000000..c82e0a165 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/operations/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/operations/test.swf b/tests/tests/swfs/avm1/from_shumway/operations/test.swf new file mode 100644 index 000000000..eb267cb4f Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/operations/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/operations/test.toml b/tests/tests/swfs/avm1/from_shumway/operations/test.toml new file mode 100644 index 000000000..25574e119 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/operations/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/operations + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v6/output.txt b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/output.txt new file mode 100644 index 000000000..b76573e4b --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/output.txt @@ -0,0 +1,6 @@ +2 +TeSt +1 +tEst +1 +tEst diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.fla b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.fla new file mode 100644 index 000000000..508f29322 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.swf b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.swf new file mode 100644 index 000000000..07bd8c5e2 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.toml b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.toml new file mode 100644 index 000000000..773813604 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/property_paths/v6/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/property_paths + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v7/output.txt b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/output.txt new file mode 100644 index 000000000..37924bab2 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/output.txt @@ -0,0 +1,7 @@ +undefined +tEst +TeSt +undefined +TeSt +tEst +undefined diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.fla b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.fla new file mode 100644 index 000000000..3b2d54cf1 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.swf b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.swf new file mode 100644 index 000000000..be9026859 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.toml b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.toml new file mode 100644 index 000000000..773813604 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/property_paths/v7/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/property_paths + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/output.txt b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/output.txt new file mode 100644 index 000000000..37e60de98 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/output.txt @@ -0,0 +1,2 @@ +MIXEDcase 4 +mixedCase 5 diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.fla b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.fla new file mode 100644 index 000000000..8aa269e85 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.swf b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.swf new file mode 100644 index 000000000..f86487bd9 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.toml b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.toml new file mode 100644 index 000000000..caa1319da --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v6/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/propertycase + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/output.txt b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/output.txt new file mode 100644 index 000000000..ab3a77cb8 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/output.txt @@ -0,0 +1,5 @@ +MixEdcase 2 +mixedCASE 4 +MIXEDcase 3 +MixEdcase 2 +mixedCase 5 diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.fla b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.fla new file mode 100644 index 000000000..50fee7bf1 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.swf b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.swf new file mode 100644 index 000000000..8fe456e07 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.toml b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.toml new file mode 100644 index 000000000..caa1319da --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/propertycase/preserving_v7/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/propertycase + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/output.txt b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/output.txt new file mode 100644 index 000000000..7dd114993 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/output.txt @@ -0,0 +1,7 @@ +0 +0 +1 +1 +undefined +[object Object] +undefined diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.fla b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.fla new file mode 100644 index 000000000..8b546d79f Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.swf b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.swf new file mode 100644 index 000000000..f0b49e1b4 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.toml b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.toml new file mode 100644 index 000000000..caa1319da --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/propertycase/propertycase/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/propertycase + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/rollover/input.json b/tests/tests/swfs/avm1/from_shumway/rollover/input.json new file mode 100644 index 000000000..b138ad2a0 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/rollover/input.json @@ -0,0 +1,28 @@ +[ + { + "type": "Wait" + }, + { + "type": "MouseMove", + "pos": [50.0, 40.0] + }, + { + "type": "Wait" + }, + { + "type": "MouseDown", + "pos": [50.0, 40.0], + "btn": "Left" + }, + { + "type": "Wait" + }, + { + "type": "MouseUp", + "pos": [50.0, 40.0], + "btn": "Left" + }, + { + "type": "Wait" + } +] \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/rollover/output.txt b/tests/tests/swfs/avm1/from_shumway/rollover/output.txt new file mode 100644 index 000000000..62238b3f9 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/rollover/output.txt @@ -0,0 +1,4 @@ +frame 1 +frame 2 +onRollover +onRelease diff --git a/tests/tests/swfs/avm1/from_shumway/rollover/test.fla b/tests/tests/swfs/avm1/from_shumway/rollover/test.fla new file mode 100644 index 000000000..9e2ff5ff2 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/rollover/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/rollover/test.swf b/tests/tests/swfs/avm1/from_shumway/rollover/test.swf new file mode 100644 index 000000000..44f9155e3 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/rollover/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/rollover/test.toml b/tests/tests/swfs/avm1/from_shumway/rollover/test.toml new file mode 100644 index 000000000..4c54e9318 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/rollover/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/rollover + +num_frames = 5 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/scope/output.txt b/tests/tests/swfs/avm1/from_shumway/scope/output.txt new file mode 100644 index 000000000..efe62d82a --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/scope/output.txt @@ -0,0 +1,14 @@ +---this +_level0 +---t() +_level0 +---b.t() +[object Object] +---b.t2() +_level0 +---b.t3() +[object Object] +---b.t4() +[type Object] +---_global +[type Object] diff --git a/tests/tests/swfs/avm1/from_shumway/scope/test.fla b/tests/tests/swfs/avm1/from_shumway/scope/test.fla new file mode 100644 index 000000000..d75d29b3e Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/scope/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/scope/test.swf b/tests/tests/swfs/avm1/from_shumway/scope/test.swf new file mode 100644 index 000000000..b7f3990a3 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/scope/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/scope/test.toml b/tests/tests/swfs/avm1/from_shumway/scope/test.toml new file mode 100644 index 000000000..bcfd1eae5 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/scope/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/scope + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/setinterval/output.txt b/tests/tests/swfs/avm1/from_shumway/setinterval/output.txt new file mode 100644 index 000000000..e07b6427b --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/setinterval/output.txt @@ -0,0 +1,20 @@ +setInterval tests: +setInterval without arguments does nothing: undefined +setInterval without interval does nothing: undefined +setInterval with null argument 0 does nothing: undefined +setInterval with undefined argument 0 does nothing: undefined +setInterval with numeric argument 0 does nothing: undefined +setInterval with stringy argument 0 does nothing: undefined +setInterval with boolean argument 0 does nothing: undefined +setInterval with object argument 0 and no argument 1 does nothing: undefined +setInterval with object argument 0 and non-string argument 1 does nothing: undefined +setInterval with object argument 0, string argument 1, and no interval does nothing: undefined +non-numeric interval is treated as 0: 1 +non-numeric interval triggered +setInterval forwards rest arguments: 2 +function callback called +arg1: arg 1 +arg2: 2 +object-callback called +arg1: arg 1 +arg2: 2 diff --git a/tests/tests/swfs/avm1/from_shumway/setinterval/test.fla b/tests/tests/swfs/avm1/from_shumway/setinterval/test.fla new file mode 100644 index 000000000..888e9f52c Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/setinterval/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/setinterval/test.swf b/tests/tests/swfs/avm1/from_shumway/setinterval/test.swf new file mode 100644 index 000000000..30031fd89 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/setinterval/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/setinterval/test.toml b/tests/tests/swfs/avm1/from_shumway/setinterval/test.toml new file mode 100644 index 000000000..fc723c245 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/setinterval/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/setinterval + +num_frames = 50 +sleep_to_meet_frame_rate = true \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/settimeout/output.txt b/tests/tests/swfs/avm1/from_shumway/settimeout/output.txt new file mode 100644 index 000000000..2c8335161 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/settimeout/output.txt @@ -0,0 +1,17 @@ +setTimeout tests: +setTimeout without arguments does nothing: undefined +setTimeout without interval does nothing: undefined +setTimeout with null argument 0 does nothing: undefined +setTimeout with undefined argument 0 does nothing: undefined +setTimeout with numeric argument 0 does nothing: undefined +setTimeout with stringy argument 0 does nothing: undefined +setTimeout with boolean argument 0 does nothing: undefined +setTimeout with object argument 0 and no argument 1 does nothing: undefined +setTimeout with object argument 0 and numeric argument 1 does nothing: undefined +clearTimeout cancels setTimeout: 1 +non-numeric interval is treated as 0: 2 +non-numeric interval triggered +setTimeout forwards rest arguments: 3 +function callback called +arg1: arg 1 +arg2: 2 diff --git a/tests/tests/swfs/avm1/from_shumway/settimeout/test.fla b/tests/tests/swfs/avm1/from_shumway/settimeout/test.fla new file mode 100644 index 000000000..3df2c3387 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/settimeout/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/settimeout/test.swf b/tests/tests/swfs/avm1/from_shumway/settimeout/test.swf new file mode 100644 index 000000000..604279b56 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/settimeout/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/settimeout/test.toml b/tests/tests/swfs/avm1/from_shumway/settimeout/test.toml new file mode 100644 index 000000000..a8ee53c0c --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/settimeout/test.toml @@ -0,0 +1,4 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/settimeout + +num_frames = 50 +sleep_to_meet_frame_rate = true \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/super/output.txt b/tests/tests/swfs/avm1/from_shumway/super/output.txt new file mode 100644 index 000000000..4f45fb303 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/super/output.txt @@ -0,0 +1,11 @@ +constructor A +constructor A +constructor B +constructor A +constructor B +constructor C +C B +C A +C +A +B diff --git a/tests/tests/swfs/avm1/from_shumway/super/test.fla b/tests/tests/swfs/avm1/from_shumway/super/test.fla new file mode 100644 index 000000000..d141c809e Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/super/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/super/test.swf b/tests/tests/swfs/avm1/from_shumway/super/test.swf new file mode 100644 index 000000000..45dc2e6f1 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/super/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/super/test.toml b/tests/tests/swfs/avm1/from_shumway/super/test.toml new file mode 100644 index 000000000..ea973d110 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/super/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/super + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/telltarget/output.txt b/tests/tests/swfs/avm1/from_shumway/telltarget/output.txt new file mode 100644 index 000000000..b394d555c --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/telltarget/output.txt @@ -0,0 +1,18 @@ +this = _level0 +x = 1 +_x = 0 +xx = 100 +_level0.xx = undefined +this = _level0 +a.x = 2 +a._x = 20 +xx = 100 +b.x = 3 +a/b:_x = 30 +in function +x = 4 +_x = 0 +xx = 100 +x = 4 +b._x = 30 +end diff --git a/tests/tests/swfs/avm1/from_shumway/telltarget/test.fla b/tests/tests/swfs/avm1/from_shumway/telltarget/test.fla new file mode 100644 index 000000000..38ce82f10 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/telltarget/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/telltarget/test.swf b/tests/tests/swfs/avm1/from_shumway/telltarget/test.swf new file mode 100644 index 000000000..61a918b42 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/telltarget/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/telltarget/test.toml b/tests/tests/swfs/avm1/from_shumway/telltarget/test.toml new file mode 100644 index 000000000..fb94df76e --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/telltarget/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/telltarget + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/text_bind/expected.png b/tests/tests/swfs/avm1/from_shumway/text_bind/expected.png new file mode 100644 index 000000000..bdfa9c4a5 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/text_bind/expected.png differ diff --git a/tests/tests/swfs/avm1/from_shumway/text_bind/output.txt b/tests/tests/swfs/avm1/from_shumway/text_bind/output.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/tests/swfs/avm1/from_shumway/text_bind/test.fla b/tests/tests/swfs/avm1/from_shumway/text_bind/test.fla new file mode 100644 index 000000000..6f89fec76 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/text_bind/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/text_bind/test.swf b/tests/tests/swfs/avm1/from_shumway/text_bind/test.swf new file mode 100644 index 000000000..a82337951 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/text_bind/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/text_bind/test.toml b/tests/tests/swfs/avm1/from_shumway/text_bind/test.toml new file mode 100644 index 000000000..5293c6202 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/text_bind/test.toml @@ -0,0 +1,9 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/text_bind + +num_frames = 6 + +[image_comparison] +tolerance = 0 + +[player_options] +with_renderer = { optional = false, sample_count = 1 } \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/html/output.txt b/tests/tests/swfs/avm1/from_shumway/textfield/html/output.txt new file mode 100644 index 000000000..0df971e6a --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/textfield/html/output.txt @@ -0,0 +1,4 @@ +foo +foo +foo +true diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/html/test.fla b/tests/tests/swfs/avm1/from_shumway/textfield/html/test.fla new file mode 100644 index 000000000..1d80d9e62 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/textfield/html/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/html/test.swf b/tests/tests/swfs/avm1/from_shumway/textfield/html/test.swf new file mode 100644 index 000000000..48bdaf4bf Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/textfield/html/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/html/test.toml b/tests/tests/swfs/avm1/from_shumway/textfield/html/test.toml new file mode 100644 index 000000000..020067dad --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/textfield/html/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/textfield + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/output.txt b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/output.txt new file mode 100644 index 000000000..5c1920e11 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/output.txt @@ -0,0 +1,8 @@ +undefined +string +undefined +string +null +string +null +string diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.fla b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.fla new file mode 100644 index 000000000..f97832a05 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.swf b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.swf new file mode 100644 index 000000000..5481decbe Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.toml b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.toml new file mode 100644 index 000000000..020067dad --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/textfield/text-setters/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/textfield + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v6/output.txt b/tests/tests/swfs/avm1/from_shumway/undefined/v6/output.txt new file mode 100644 index 000000000..e07479388 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/undefined/v6/output.txt @@ -0,0 +1,39 @@ +undefined +[object Object] +undefined +0 +true +'s' + undefined => s +undefined + 's' => s +0 + undefined => 0 +undefined + 0 => 0 +'undefined' == undefined => false +undefined == 'undefined' => false +0 == undefined => false +undefined == 0 => false +1 == undefined => false +undefined == 1 => false +'undefined' < undefined => +undefined < 'undefined' => +0 < undefined => false +undefined < 0 => false +1 < undefined => false +undefined < 1 => true +'undefined' <= undefined => true +undefined <= 'undefined' => true +0 <= undefined => true +undefined <= 0 => true +1 <= undefined => false +undefined <= 1 => true +'undefined' > undefined => +undefined > 'undefined' => +0 > undefined => false +undefined > 0 => false +1 > undefined => true +undefined > 1 => false +'undefined' >= undefined => true +undefined >= 'undefined' => true +0 >= undefined => true +undefined >= 0 => true +1 >= undefined => true +undefined >= 1 => false diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.fla b/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.fla new file mode 100644 index 000000000..cdd597589 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.swf b/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.swf new file mode 100644 index 000000000..af046a9c5 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.toml b/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.toml new file mode 100644 index 000000000..8f691b3a4 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/undefined/v6/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/undefined + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v7/output.txt b/tests/tests/swfs/avm1/from_shumway/undefined/v7/output.txt new file mode 100644 index 000000000..084490ce5 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/undefined/v7/output.txt @@ -0,0 +1,39 @@ +undefined +[object Object] +undefined +NaN +true +'s' + undefined => sundefined +undefined + 's' => undefineds +0 + undefined => NaN +undefined + 0 => NaN +'undefined' == undefined => false +undefined == 'undefined' => false +0 == undefined => false +undefined == 0 => false +1 == undefined => false +undefined == 1 => false +'undefined' < undefined => undefined +undefined < 'undefined' => undefined +0 < undefined => undefined +undefined < 0 => undefined +1 < undefined => undefined +undefined < 1 => undefined +'undefined' <= undefined => true +undefined <= 'undefined' => true +0 <= undefined => true +undefined <= 0 => true +1 <= undefined => true +undefined <= 1 => true +'undefined' > undefined => undefined +undefined > 'undefined' => undefined +0 > undefined => undefined +undefined > 0 => undefined +1 > undefined => undefined +undefined > 1 => undefined +'undefined' >= undefined => true +undefined >= 'undefined' => true +0 >= undefined => true +undefined >= 0 => true +1 >= undefined => true +undefined >= 1 => true diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.fla b/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.fla new file mode 100644 index 000000000..80f70938d Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.swf b/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.swf new file mode 100644 index 000000000..bd9edeb92 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.toml b/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.toml new file mode 100644 index 000000000..8f691b3a4 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/undefined/v7/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/undefined + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/watch/output.txt b/tests/tests/swfs/avm1/from_shumway/watch/output.txt new file mode 100644 index 000000000..6e86b06d7 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/watch/output.txt @@ -0,0 +1,2 @@ +tabEnabled: true +prop 1 2 test diff --git a/tests/tests/swfs/avm1/from_shumway/watch/test.fla b/tests/tests/swfs/avm1/from_shumway/watch/test.fla new file mode 100644 index 000000000..6eaa69e29 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/watch/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/watch/test.swf b/tests/tests/swfs/avm1/from_shumway/watch/test.swf new file mode 100644 index 000000000..87b99cd96 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/watch/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/watch/test.toml b/tests/tests/swfs/avm1/from_shumway/watch/test.toml new file mode 100644 index 000000000..b98786e91 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/watch/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/watch + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/xml/build/output.txt b/tests/tests/swfs/avm1/from_shumway/xml/build/output.txt new file mode 100644 index 000000000..b9c4cdcff --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/build/output.txt @@ -0,0 +1 @@ +text diff --git a/tests/tests/swfs/avm1/from_shumway/xml/build/test.fla b/tests/tests/swfs/avm1/from_shumway/xml/build/test.fla new file mode 100644 index 000000000..36115bae7 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/xml/build/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/xml/build/test.swf b/tests/tests/swfs/avm1/from_shumway/xml/build/test.swf new file mode 100644 index 000000000..6fe367c86 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/xml/build/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/xml/build/test.toml b/tests/tests/swfs/avm1/from_shumway/xml/build/test.toml new file mode 100644 index 000000000..7f2cddaa3 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/build/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/xml + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/xml/load/output.txt b/tests/tests/swfs/avm1/from_shumway/xml/load/output.txt new file mode 100644 index 000000000..98e7c5f9b --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/load/output.txt @@ -0,0 +1,5 @@ +data: 18 string +load: true true +bytes: 18/18 +xml: data + diff --git a/tests/tests/swfs/avm1/from_shumway/xml/load/test.fla b/tests/tests/swfs/avm1/from_shumway/xml/load/test.fla new file mode 100644 index 000000000..cb724f5f4 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/xml/load/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/xml/load/test.swf b/tests/tests/swfs/avm1/from_shumway/xml/load/test.swf new file mode 100644 index 000000000..050292d22 Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/xml/load/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/xml/load/test.toml b/tests/tests/swfs/avm1/from_shumway/xml/load/test.toml new file mode 100644 index 000000000..7f2cddaa3 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/load/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/xml + +num_frames = 1 \ No newline at end of file diff --git a/tests/tests/swfs/avm1/from_shumway/xml/load/xmlload.xml b/tests/tests/swfs/avm1/from_shumway/xml/load/xmlload.xml new file mode 100644 index 000000000..1e8c41dc1 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/load/xmlload.xml @@ -0,0 +1 @@ +data diff --git a/tests/tests/swfs/avm1/from_shumway/xml/string/output.txt b/tests/tests/swfs/avm1/from_shumway/xml/string/output.txt new file mode 100644 index 000000000..d267f9f44 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/string/output.txt @@ -0,0 +1,9 @@ +1 +test +3 +1 +string +test +3 +text +test2 diff --git a/tests/tests/swfs/avm1/from_shumway/xml/string/test.fla b/tests/tests/swfs/avm1/from_shumway/xml/string/test.fla new file mode 100644 index 000000000..60ba0ec1b Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/xml/string/test.fla differ diff --git a/tests/tests/swfs/avm1/from_shumway/xml/string/test.swf b/tests/tests/swfs/avm1/from_shumway/xml/string/test.swf new file mode 100644 index 000000000..3e51793ff Binary files /dev/null and b/tests/tests/swfs/avm1/from_shumway/xml/string/test.swf differ diff --git a/tests/tests/swfs/avm1/from_shumway/xml/string/test.toml b/tests/tests/swfs/avm1/from_shumway/xml/string/test.toml new file mode 100644 index 000000000..7f2cddaa3 --- /dev/null +++ b/tests/tests/swfs/avm1/from_shumway/xml/string/test.toml @@ -0,0 +1,3 @@ +# Test adapted from Shumway at https://github.com/mozilla/shumway/tree/master/test/swfs/avm1/xml + +num_frames = 1 \ No newline at end of file