Skip to content

Commit

Permalink
tests: Add avm1/sandbox_type_remote test
Browse files Browse the repository at this point in the history
Verifies the sandbox type of SWFs loaded through network.
  • Loading branch information
kjarosh committed Sep 13, 2024
1 parent 5da61c8 commit 24b0c8b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions tests/tests/swfs/avm1/sandbox_type_remote/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Current sandbox type: localWithNetwork
[network] Current sandbox type: remote
[no network] Current sandbox type: remote
10 changes: 10 additions & 0 deletions tests/tests/swfs/avm1/sandbox_type_remote/test.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
trace("Current sandbox type: " + System.security.sandboxType);

var networkMc = _root.createEmptyMovieClip("network_mc", _root.getNextHighestDepth());

var loader = new MovieClipLoader();
loader.onLoadInit = function(target, status) {
var noNetworkMc = _root.createEmptyMovieClip("no_network_mc", _root.getNextHighestDepth());
noNetworkMc.loadMovie("http://localhost:8000/test-no-network.swf");
}
loader.loadClip("http://localhost:8000/test-network.swf", networkMc);
Binary file added tests/tests/swfs/avm1/sandbox_type_remote/test.swf
Binary file not shown.
1 change: 1 addition & 0 deletions tests/tests/swfs/avm1/sandbox_type_remote/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
num_ticks = 3

0 comments on commit 24b0c8b

Please sign in to comment.