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

Revive Test262 integration #35621

Closed
wants to merge 31 commits into from
Closed

Conversation

foolip
Copy link
Member

@foolip foolip commented Aug 25, 2022

Based on #8980

dpino and others added 30 commits January 10, 2018 16:45
The generated tests run the target test262 within different agent.
Currently supported agents are: IFrame, Window, DedicatedWorker and
SharedWorker. For each agent two tests are generated, one in strict mode
and another in non-strict mode, unless the test indicates otherwise.

The generated tests are placed at js/test262/.
If a test expects a SyntaxError, regardless of the value of phase, the
error is always managed in window.onerror.
Replace CR + LF for LF only.
Replace CR for LF.
Tests that use ES functions such as createRealm, evalScript or
dettachArrayBuffer are not supported in a Worker context.

These operations are implemented in a Window context by appending new
elements to the DOM (an iframe in the case of createRealm and a script
element in the case of evalScript). Workers don't have access to the
Window object. On the other hand, creating a new realm by instantiating
a new Worker cannot be a solution. The new realm (a Worker) won't
provide the same functions as a Window, which what the tests expect to find
after calling createRealm (for instance $262.createRealm().eval(...))
Tests marked with flag 'async' should include doneprintHandle.js.
Implement ES Shell function 'print' that receives a message
'Test262:AsyncTestComplete' in case the test completed successfully.
Otherwise, throw error. If print is never called, rely on WPT timeout
mechanism.
Tests with a negative property are supposed to throw an Exception. The
thrown exception should have the same type as negative.type.
Syntax errors, the type that are emitted during parse or early phase,
cab be caught if the test is wrapped within a try/catch.
For many tests Firefox throws a SyntaxError instead of a ReferenceError.
Many module-code tests fail cause they try to import or export a JavaScript
module which path is no longer valid. It's necesary to replace the path with
an URL. This change implies to activate CORS in the WPT WebServer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants