Skip to content

Implement missing infrastructure required by Test262 test suite  #1077

@p-bakker

Description

@p-bakker

See Host defined Functions

Not having this infrastucture means test that depend on it fail regardless of whether Rhino (correctly) supports the feature/behavior being tested

For example: the Test262 test suite contains tests that test stuff cross realms. ATM those tests are disabled, I guess because they just fail because of this missing functionality, 'cause Rhino does (at least in basis) supports EcmaScript Realms I think. As far as I can determine, calling Context.initSafeObjects() gives you a new top level scope, which for all intents and purposes is the equivalent of what the specs refer to as a Realm

As EcmaScript defines Realms, but doesn't define how they are created (because it depends on where JavaScript is being implemented), the Test262 test suite requires this additional infrastructure to get new realms without tying the tests to specific environments

So this case is about implemeting this additional infra structure in Test262SuiteTest.java

In the process of implementing this, the exclusion of all tests tagged with cross-realm can be removed, see https://github.com/mozilla/rhino/blob/master/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java#L105

Note that this extra infra is not used just for cross-realm, so other tests might also start passing once implemented

Blocks #1078, #943

Metadata

Metadata

Assignees

No one assigned

    Labels

    test262 harnessIssues related to failing test262 tests, due to Rhino not yet support certain JS features

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions