From 4607bfd987163d810c1683591673fe7c54f253b6 Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Sun, 1 Sep 2024 15:13:48 +0200 Subject: [PATCH] tests: Add avm2/sandbox_type_local_file test Verifies the sandbox type of a local SWF with network disabled. --- .../swfs/avm2/sandbox_type_local_file/Test.as | 11 +++++++++++ .../swfs/avm2/sandbox_type_local_file/output.txt | 1 + .../swfs/avm2/sandbox_type_local_file/test.swf | Bin 0 -> 742 bytes .../swfs/avm2/sandbox_type_local_file/test.toml | 1 + 4 files changed, 13 insertions(+) create mode 100644 tests/tests/swfs/avm2/sandbox_type_local_file/Test.as create mode 100644 tests/tests/swfs/avm2/sandbox_type_local_file/output.txt create mode 100644 tests/tests/swfs/avm2/sandbox_type_local_file/test.swf create mode 100644 tests/tests/swfs/avm2/sandbox_type_local_file/test.toml diff --git a/tests/tests/swfs/avm2/sandbox_type_local_file/Test.as b/tests/tests/swfs/avm2/sandbox_type_local_file/Test.as new file mode 100644 index 000000000..78251889d --- /dev/null +++ b/tests/tests/swfs/avm2/sandbox_type_local_file/Test.as @@ -0,0 +1,11 @@ +package { + import flash.display.Sprite; + import flash.system.Security; + + // Compile with network disabled + public class Test extends Sprite { + public function Test() { + trace("Current sandbox type: " + Security.sandboxType); + } + } +} diff --git a/tests/tests/swfs/avm2/sandbox_type_local_file/output.txt b/tests/tests/swfs/avm2/sandbox_type_local_file/output.txt new file mode 100644 index 000000000..e0f988a58 --- /dev/null +++ b/tests/tests/swfs/avm2/sandbox_type_local_file/output.txt @@ -0,0 +1 @@ +Current sandbox type: localWithFile diff --git a/tests/tests/swfs/avm2/sandbox_type_local_file/test.swf b/tests/tests/swfs/avm2/sandbox_type_local_file/test.swf new file mode 100644 index 0000000000000000000000000000000000000000..a0e6f65e1ea86ad52b3a0bb37ffa840b90590fe6 GIT binary patch literal 742 zcmV<7)9652|)^Fef;#9t%%sOe)a$%)i?aaLQc6Mea zNcw@$%4dW&F>0@EB81-Oe`181p=CE-w)eHk$n~NISUbfbV?jgL$K!E%Tr2zGK(Ey6 zb=|1y)oKY4rD*CgGAVh{y<#g7Xw%3Hoq##Mr*T2j_hYtGEY4Le^HMa3LpPDMOr5%P zL_HSim2w4yEVE(z;fSyn2?EzK3769+rD*7z$76CrOSVg*VN+iKIfpsSrLEn7m_w@V zyL6)MF6aq(hTvFhk!NfEOB)zvlCYD!62?^==LK=!b)q2+FW%|+HXD-=9`s|+N-|A| z3m~VNAtlWJFX;ltDK7B_F&WSn^?I*5iRPs%`2k_H)uDk_+tR8=^}#G%?riG3@>e=B z_ds)7XeAfldVW}XvD@jqK783mr>igl*H%0COKhS&;r#skZAOHU3|q<_f3LxmAoStc z^vg%Meajrth@r3Rzro;<#LS^G2W?1+mDQnv+uQtJCQ*uo#H5A2I1HiLT0}gn?@u%~ z4QNA4cc>YM4x26~y)8%6h|$r~9CQR2mCNY-$j%^^69q1r%AEjsR6gv#qb6H@asuLQ z2oVNz5YFW&_eNRn2g(e(cHl7zDKY1S&OC){@jV}g+wo|4yVo1|J?8gJ=wZ*Iw&OW` zBzr^Z24dhxV&&nZjSJAf@k*_#q;NqfD22=>F07y>MUWIxR)n-7U_}CRS&_4fw5mus zMOuTB3s6E8wt$2iIKO@q=L=X$si~ySSin*nLkx=uwR0X2Ww>&KAcUq1Xr3ciYFBme*a literal 0 HcmV?d00001 diff --git a/tests/tests/swfs/avm2/sandbox_type_local_file/test.toml b/tests/tests/swfs/avm2/sandbox_type_local_file/test.toml new file mode 100644 index 000000000..cf6123969 --- /dev/null +++ b/tests/tests/swfs/avm2/sandbox_type_local_file/test.toml @@ -0,0 +1 @@ +num_ticks = 1