Testcases

From Gnash Project Wiki

Jump to: navigation, search

This page is about pure ActionScript testcases. See TestingFramework for more informations about the other testing mechanisms used by Gnash.

Contents

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

Critical bugs in cvs head

Action execution order

related testcases: testsuite/misc-ming.all/action_execution_order_test*.c

After the big action execution related commit a single test fails among those ones:

XFAIL: action_execution_order_test6runner

See ActionsExecutionOrder for more info

Case sensitiveness

related testcases: testsuite/actionscript.all/case.as

Most tests pass, the left over is case-retention for property names
when enumerating them.

Fundamental operators

related testcases: testsuite/actionscript.all/ops.as

Most tests pass now, the left overs are all due different NaN values

Soft reference

related testcases: testsuite/actionscript.all/MovieClip.as; testsuite/misc-ming.all/displaylist_depths_test{2,3,4,5}.c; testsuite/misc-swfc.all/soft_reference_test1.sc

NOTE: none of these fail anymore, since last commit about soft refs --Strk 12:16, 24 August 2007 (EDT); NOTE2: we found out that soft refs are used for more then just MovieClip, more tests are required to check the rest (TextField, Button, Video.... any as-referenceable one)

Others

There are still some other minor bugs exist in our testcases, the above are just what I think critical.

Untested topics

Key handling

No failing tests in our testsuite. Ming support of 'onKeypress' event is bogus, so just no proper testcases, Key handling still need to be improved.

Mouse handling

No failing tests, due to lack of testcases.

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.

array

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/array.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

delete

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/delete.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

getvariable

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/getvariable.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

swap

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/swap.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8


Boolean

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Boolean.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Camera

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Camera.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Color.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

ContextMenu

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/ContextMenu.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

CustomActions

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/CustomActions.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

These files currently perform no tests, as we belive CustomActions is only meant to be used in the Flash IDE.
See http://sephiroth.it/reference.php?id=156&cat=1

Date

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Date.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Error.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Global

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Global.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8


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

LoadVars

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/LoadVars.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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]

Microphone

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Microphone.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Note: Flash 5 does NOT have the microphone object, so the SWF5 version runs no tests

Mouse

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Mouse.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

MovieClip

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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

NetStream

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/NetStream.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Number

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Number.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Selection

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Selection.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

SharedObject

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/SharedObject.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Stage

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Stage.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

String

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/String.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

System

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/System.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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

TextSnapshot

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/TextSnapshot.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Video

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Video.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Object

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Object.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Inheritance

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Inheritance.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

NetConnection

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/NetConnection.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Function

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Function.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

with

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/with.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

XML

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XML.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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)

rtmp

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/rtmp.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

XMLNode

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/XMLNode.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

LocalConnection

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/LocalConnection.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

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]

Case

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/case.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Enumerate

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/enumerate.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Key

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Key.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Ops

Source: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/ops.as?root=gnash

Targets: SWF5 SWF6 SWF7 SWF8

Personal tools