Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement missing infrastructure required by Test262 test suite #1077

Closed
p-bakker opened this issue Oct 24, 2021 · 1 comment · Fixed by #1229
Closed

Implement missing infrastructure required by Test262 test suite #1077

p-bakker opened this issue Oct 24, 2021 · 1 comment · Fixed by #1229
Labels
test262 harness Issues related to failing test262 tests, due to Rhino not yet support certain JS features

Comments

@p-bakker
Copy link
Collaborator

p-bakker commented Oct 24, 2021

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

@p-bakker p-bakker added this to the Release 1.7.15 milestone Oct 24, 2021
@p-bakker p-bakker removed this from the Release 1.7.15 milestone Oct 24, 2021
@p-bakker p-bakker added the test262 harness Issues related to failing test262 tests, due to Rhino not yet support certain JS features label Oct 24, 2021
@p-bakker p-bakker changed the title Enable tests from Test262 test suite that depend on cross-realm Implement missing infrastructure required by Test262 test suite Oct 24, 2021
@p-bakker
Copy link
Collaborator Author

Note: quick search seems to reveal that for subset of tests from the Test262 test suite that are (currently) applicable to Rhino, only $262.evalScript(...) and $262.createRealm(...) are used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test262 harness Issues related to failing test262 tests, due to Rhino not yet support certain JS features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant