Skip to content

Commit

Permalink
tests: Add test for reusing Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-McSweeney authored and Lord-McSweeney committed Jul 2, 2024
1 parent ce386e8 commit 00f1703
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
Binary file added tests/tests/swfs/avm2/loader_reuse/loaded.swf
Binary file not shown.
38 changes: 38 additions & 0 deletions tests/tests/swfs/avm2/loader_reuse/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Dumping loader info before anything
content: null
contentLoaderInfo: [object LoaderInfo]
contentLoaderInfo.actionScriptVersion: (inaccessible)
contentLoaderInfo.bytesLoaded: 0
contentLoaderInfo.bytesTotal: 0

Dumping loader info after load called
content: null
contentLoaderInfo: [object LoaderInfo]
contentLoaderInfo.actionScriptVersion: (inaccessible)
contentLoaderInfo.bytesLoaded: 0
contentLoaderInfo.bytesTotal: 0

Hello from loaded SWF!
Dumping loader info on complete
content: [object MovieClip]
contentLoaderInfo: [object LoaderInfo]
contentLoaderInfo.actionScriptVersion: 3
contentLoaderInfo.bytesLoaded: 248
contentLoaderInfo.bytesTotal: 248

Dumping loader info after second load called
content: null
contentLoaderInfo: [object LoaderInfo]
contentLoaderInfo.actionScriptVersion: (inaccessible)
contentLoaderInfo.bytesLoaded: 0
contentLoaderInfo.bytesTotal: 0

Hello from loaded SWF!
Dumping loader info on complete
content: [object MovieClip]
contentLoaderInfo: [object LoaderInfo]
contentLoaderInfo.actionScriptVersion: 3
contentLoaderInfo.bytesLoaded: 248
contentLoaderInfo.bytesTotal: 248

returning because done === true
Binary file added tests/tests/swfs/avm2/loader_reuse/test.swf
Binary file not shown.
1 change: 1 addition & 0 deletions tests/tests/swfs/avm2/loader_reuse/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
num_frames = 3

0 comments on commit 00f1703

Please sign in to comment.