Testcases
From Gnash Project Wiki
This page is about pure ActionScript testcases. See TestingFramework for more informations about the other testing mechanisms used by Gnash.
How to use
This page contains links to ActionScript testcases made within the Gnash project. For every testcase you have a link to its source code and to the generated SWF in four different versions, from 5 to 8. The tests are compiled with Ming's makeswf utility.
When played, the tests will print revision id of their sourcecode. You can use this information to find the exact source used to produce that test. The Source link points to a page listing all revisions.
Any failed test will be displayed together with the linenumber in the corresponding source code. Expected and unexpected successes are *not* displayed.
A summary of run tests will *always* be printed. If this is not the case our testcases are badly broken.
If you play the tests with the Adobe player and see any failure, plese update the testcase section with information about player version (displayed by the testcase, if not badly broken), the SWF#, the testcase revision and the failing lines. Note that all this information is displayed, so you can probably copy and paste into the wiki section. Better yet, if you're a Flash coder, you can look at the sourcecode and tell us what we're doing wrong :)
NOTE: since the wiki is no more easily accessible, consider submitting patches or bug reports through the savannah project page
Adobe Player Test Results
This is the output for running the Gnash test suite with the Adobe Flash player. As Gnash developers avoid using the proprietary player, these test results are contributed by others on the net. Thank you all for helping with Gnash!
NOTE that the preferred way to report results is by directly pasting the results in the specific testcase section. WARNING the results are likely out of date, as tests are often modified
Testcases
The best way to debug testcases is writing results directly in a specific test's section, complete with RCSid of the test (should be printed when the test is played). Also, for flash coders, a link to the source of each test is present, pointing at the CVS repository. Looking at it may help catching obvious misunderstanding in ActionScript constructs.
AsBroadcaster
ASnative
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/ASnative.as;hb=HEAD
Accessibility
array
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/array.as;hb=HEAD
BitmapData
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/BitmapData.as;hb=HEAD
delete
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/delete.as;hb=HEAD
getvariable
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/getvariable.as;hb=HEAD
swap
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/swap.as;hb=HEAD
setProperty
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/setProperty.as;hb=HEAD
targetPath
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/targetPath.as;hb=HEAD
Boolean
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Boolean.as;hb=HEAD
Camera
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Camera.as;hb=HEAD
Help with usage example for this class is welcome, as it's not clear to the developer how it should work. Reports say that targets from SWF6 up are failing with the proprietary player.
Color
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Color.as;hb=HEAD
ColorTransform
ContextMenu
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/ContextMenu.as;hb=HEAD
Date
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Date.as;hb=HEAD
COMPATIBILITY PROBLEM adobe player 9 versions behave differently:
SWF5 + SWF6 + SWF7 + SWF8 - LNX 9,0,31,0 + LNX 9,0,48,0 [$Id: Date.as,v 1.25 2007/07/01 10:54:38 bjacques Exp $] FAILED: expected: "NaN" obtained: -6.77681005679424e+19 [./Date.as:269] FAILED: expected: "Infinity" obtained: -6.77681005679424e+19 [./Date.as:271] FAILED: expected: "-Infinity" obtained: -6.77681005679424e+19 [./Date.as:273] FAILED: expected: "Infinity" obtained: NaN [./Date.as:278] FAILED: expected: "-Infinity" obtained: NaN [./Date.as:280] SWF5 + SWF6 + SWF7 + SWF8 - MAC 9,0,47,0 [$Id: Date.as,v 1.26 2007/07/26 03:41:18 strk Exp $] FAILED: expected: "NaN" obtained: -6.77681005679532e+19 [./Date.as:270] FAILED: expected: "Infinity" obtained: 6.77679762020148e+19 [./Date.as:272] FAILED: expected: "-Infinity" obtained: -6.77681005679532e+19 [./Date.as:274] FAILED: expected: "Infinity" obtained: NaN [./Date.as:279] FAILED: expected: "-Infinity" obtained: NaN [./Date.as:281] SWF5 + SWF6 + SWF7 + SWF8 - WIN 8,0,22,0 [$Id: Date.as,v 1.27 2007/09/29 16:22:57 strk Exp $] FAILED: expected: "Invalid Date" obtained: Sun Jan 1 00:00:00 GMT+0000 1970 [./Date.as:220] FAILED: expected: "Invalid Date" obtained: Sun Jan 1 00:00:00 GMT+0000 1970 [./Date.as:224] FAILED: expected: "NaN" obtained: -62167222800000 [./Date.as:270] FAILED: expected: "Infinity" obtained: -62167222800000 [./Date.as:272] FAILED: expected: "-Infinity" obtained: -62167222800000 [./Date.as:274] FAILED: expected: "NaN" obtained: -62167222800000 [./Date.as:277] FAILED: expected: "Infinity" obtained: -62167222800000 [./Date.as:279] FAILED: expected: "-Infinity" obtained: -62167222800000 [./Date.as:281]
SWF5 + SWF6 + SWF7 + SWF8 - LNX 9,0,31,0 [$Id: Date.as,v 1.32 2007/10/26 08:26:54 strk Exp $] FAILED: expected: "NaN" obtained: -6.77681005679748e+19 [/home/strk/src/gnash/gnash-head/testsuite/actionscript.all/Date.as:281] FAILED: expected: "Infinity" obtained: -6.77681005679748e+19 [/home/strk/src/gnash/gnash-head/testsuite/actionscript.all/Date.as:283] FAILED: expected: "-Infinity" obtained: -6.77681005679748e+19 [/home/strk/src/gnash/gnash-head/testsuite/actionscript.all/Date.as:285] FAILED: expected: "Infinity" obtained: NaN [/home/strk/src/gnash/gnash-head/testsuite/actionscript.all/Date.as:290] FAILED: expected: "-Infinity" obtained: NaN [/home/strk/src/gnash/gnash-head/testsuite/actionscript.all/Date.as:292]
- It is possible that these failures have been introduced by a change in Ming's handling of large integer values.
- I didn't test this, but we should before fixing anything, as if this is the case Ming version would change the
- generated SWF and thus create different SWFs... See
Bug #19191.
- Actually, it seems the testcase author already knew about the expected results, but decided it wasn't worth emulating
- Here's an excerpt:
- lines 270, 272 and 274:
- // Bad numeric value handling: year is an invalid number with >1 arg
- // The commercial player for these first three cases gives
- // -6.77681005679712e+19 Tue Jan -719527 00:00:00 GMT+0000
- // but that doesn't seem worth emulating...
- Does anyone have an idea about what that -6.77xxx number represent ?
Error
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Error.as;hb=HEAD
ExternalInterface
Function
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Function.as;hb=HEAD
flash
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/flash.as;hb=HEAD
Global
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Global.as;hb=HEAD
COMPATIBILITY PROBLEM adobe player 9 versions behave differently:
SWF5 - LNX 9,0,31,0 [$Id: Global.as,v 1.25 2007/07/01 10:54:39 bjacques Exp $] XFAILED: expected: ':/?=&387' obtained: :/?=&/0) [./Global.as:73] [./Global.as:87] XFAILED: expected: ':/?=&87' obtained: :/?=&0) [./Global.as:73] [./Global.as:95] SWF5 - LNX 9,0,48,0 [$Id: Global.as,v 1.25 2007/07/01 10:54:39 bjacques Exp $] XFAILED: expected: ':/?=&387' obtained: :/?=& [./Global.as:87] XFAILED: expected: ':/?=&87' obtained: :/?=&t [./Global.as:95] SWF5 - MAC 9,0,47,0 [$Id: Global.as,v 1.26 2007/07/26 03:41:18 strk Exp $] XFAILED: expected: ':/?=&387' obtained: :/?=&e [./Global.as:88] XFAILED: expected: ':/?=&87' obtained: :/?=& [./Global.as:96] SWF8 - LNX 9,0,48,0 [$Id: Global.as,v 1.26 2007/07/26 03:41:18 strk Exp $] XFAILED: expected: ':/?=&' obtained: :/?=&�¨ [./Global.as:92]
- We belive the proprietary player has a memory corruption issue here. Other opinions would be useful.
- The SWF8 failure doesn't happen with MAC 9,0,47,0 PPC. Adobe probably forgot to add a NUL at the end in LNX 9,0,48,0 i386. - ivazquez
HitTest
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/HitTest.as;hb=HEAD
Inheritance
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Inheritance.as;hb=HEAD
Instance
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Instance.as;hb=HEAD
Key
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Key.as;hb=HEAD
LoadVars
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/LoadVars.as;hb=HEAD
SWF6 - LNX 9,0,48,0 + MAC 9,0,47,0 [$Id: LoadVars.as,v 1.13 2007/07/26 03:41:18 strk Exp $] LoadVars.onLoad called 1. Bytes loaded: 0/ FAILED: expected: loadvarsObj.getBytesTotal() obtained: 0 [./LoadVars.as:87] FAILED: expected: true obtained: false [./LoadVars.as:89] FAILED: expected: 'val1' obtained: previous val1 [./LoadVars.as:95] FAILED: expected: 'val2' obtained: [./LoadVars.as:97] SWF7 + SWF8 - LNX 9,0,48,0 + MAC 9,0,47,0 [$Id: LoadVars.as,v 1.13 2007/07/26 03:41:18 strk Exp $] LoadVars.onLoad called 1. Bytes loaded: 0/undefined FAILED: expected: loadvarsObj.getBytesTotal() obtained: 0 [./LoadVars.as:87] FAILED: expected: true obtained: false [./LoadVars.as:89] FAILED: expected: 'val1' obtained: previous val1 [./LoadVars.as:95] FAILED: expected: 'val2' obtained: undefined [./LoadVars.as:97]
Math
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Math.as;hb=HEAD
Microphone
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Microphone.as;hb=HEAD
Note: Flash 5 does NOT have the microphone object, so the SWF5 version runs no tests
Mouse
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Mouse.as;hb=HEAD
MovieClip
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/MovieClip.as;hb=HEAD
SWF5 - LNX 9,0,48,0 + MAC 9,0,47,0 [$Id: MovieClip.as,v 1.78 2007/07/26 03:41:19 strk Exp $] FAILED: <empty>._name (trough getProperty(13)) returns (expected undefined) [./MovieClip.as:564] Some version of Adobe Flash Player 9 are reported to have this bug FAILED: _root._name (trough getProperty(13)) returns (expected undefined) [./MovieClip.as:595] Some version of Adobe Flash Player 9 are reported to have this bug
MovieClipLoader
NetConnection
NetStream
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/NetStream.as;hb=HEAD
Number
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Number.as;hb=HEAD
Random
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Random.as;hb=HEAD
Selection
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Selection.as;hb=HEAD
SharedObject
Sound
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Sound.as;hb=HEAD
Stage
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Stage.as;hb=HEAD
String
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/String.as;hb=HEAD
System
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/System.as;hb=HEAD
COMPATIBILITY PROBLEM : LNX 9,0,31,0 and LNX 9,0,48,0 behave differently:
SWF5 - LNX 9,0,48,0 [$Id: System.as,v 1.11 2007/07/01 10:54:40 bjacques Exp $] FAILED: expected: 'string' obtained: undefined [./System.as:59] FAILED: expected: $version obtained: LNX 9,0,48,0 [./System.as:60] FAILED: expected: 'string' obtained: undefined [./System.as:62] FAILED: expected: System.capabilities.version obtained: [./System.as:63]
SWF5 - LNX 9,0,31,0 [$Id: System.as,v 1.11 2007/07/01 10:54:40 bjacques Exp $]
SWF5 + SWF6 + SWF7 + SWF8 - LNX 9,0,48,0 + MAC 9,0,47,0 PPC [$Id: System.as,v 1.12 2007/07/26 03:41:19 strk Exp $] All tests pass. - ivazquez
SWF5 + SWF6 + SWF7 + SWF8 - LNX 9,0,48,0 [$Id: System.as,v 1.16 2007/12/13 08:47:48 strk Exp $] All test pass here too - tester
TextField
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/TextField.as;hb=HEAD
TextFieldHTML
TextFormat
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/TextFormat.as;hb=HEAD
TextSnapshot
Transform
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Transform.as;hb=HEAD
Try
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Try.as;hb=HEAD
Video
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Video.as;hb=HEAD
Matrix
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Matrix.as;hb=HEAD
Object
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Object.as;hb=HEAD
Point
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Point.as;hb=HEAD
with
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/with.as;hb=HEAD
XML
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/XML.as;hb=HEAD
SWF5 + 6 + 7 + 8 - LNX 9,0,48,0 [$Id: XML.as,v 1.54 2007/12/21 17:29:51 strk Exp $] tmp.checkParsed called myxml.loaded = false myxml.load() returned true myxml.onLoad(false) called No success loading gnash.xml
- this is due to a mis-publication, whereas the media dir is not published while it should - same should apply for LoadVariables and MovieClipLoader (anything loading external resources)
XMLSocket
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/XMLSocket.as;hb=HEAD
rtmp
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/rtmp.as;hb=HEAD
XMLNode
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/XMLNode.as;hb=HEAD
LocalConnection
SWF6 + SWF7 + SWF8 - LNX 9,0,48,0 + MAC 9,0,47,0 [$Id: LocalConnection.as,v 1.16 2007/07/26 03:41:18 strk Exp $] FAILED: LocalConnection::domain() returned localhost [73]
enumerate
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/enumerate.as;hb=HEAD
case
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/case.as;hb=HEAD
caseconv
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/caseconv.as;hb=HEAD
ops
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/ops.as;hb=HEAD
toString_valueOf
Rectangle
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/Rectangle.as;hb=HEAD
argstest
Source: http://git.sv.gnu.org/gitweb/?p=gnash.git;a=blob;f=testsuite/actionscript.all/argstest.as;hb=HEAD

