Closed Bug 685220 Opened 13 years ago Closed 6 years ago

Array.as needs complete test of subclassing

Categories

(Tamarin Graveyard :: Library, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q1 12 - Brannan

People

(Reporter: pnkfelix, Assigned: trbaker)

References

Details

Attachments

(1 file)

In Actionscript, one can introduce subclasses of Arrays, and override the length getter/setter (among other methods). We should be including tests of such usage of Array in our acceptance test suite. In particular, Bug 661330, comment 7 points out a bug in an offered patch that is not caught by our current suite (because we don't have any tests of the length setter). (Bug 420755 did start down this path with a few simple sanity tests, but these are not complete, as shown above.) A complete test would at least form a trivial subclass of array that overrides every method it can (where each override just forwards the call up to the Array superclass). (Arguably it would also be good to have a test that explores the behavior when overriding the length getter/setter. See Bug 535446, Bug 535798)
(posting my patch so far. its not complete and wants to be adopted by QE.)
Blocks: 661330
Note that the sane form of this test will need to either wait until: 1. Bug 685204 is fixed or, 2. work around it.
See Also: → 685204
Also note that there can be subclasses of ArrayObject and ArrayClass on the C++ side (and that some such subclasses exist). Don't know if you want to include that in this bug or not but we need some sort of test for it. Alas the selftest harness is really not good enough at this point to test that - tests run before the AS environment is up - so it may require some evolution of selftest. Now that I think about it that evolution could be as simple as having some C++ selftests marked %%as3 and then a mechanism for triggering those tests after the AS3 world is up. Several possibilities come to mind, SMOP.
Flags: flashplayer-qrb?
QE: adopt Felix's prototype and submit.
Assignee: nobody → trbaker
Blocks: 592726
Flags: flashplayer-qrb? → flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → Q1 12 - Brannan
A thorough test would cover both dynamic and sealed Array subclasses, and test that dynamic-ness/sealed-ness is properly checked (e.g. exceptions thrown when adding new properties to sealed instance). See Bug 654807 In particular Bug 654807, comment 9 and Bug 654807, comment 10 should give some notion of interesting corner cases to consider. See also Bug 688191 (resolving this bug properly would ideally introduce the code coverage that bug asks for).
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: