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

Document ordering requirements of imported files #4398

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions INTERPRETING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ properties of the global scope prior to test execution.
- **`IsHTMLDDA`** - (present only in implementations that can provide it) an
object that:

1. has an [[IsHTMLDDA]] internal slot, and
2. when called with no arguments or with the first argument `""` (an empty string) returns `null`.
1. has an [[IsHTMLDDA]] internal slot, and
2. when called with no arguments or with the first argument `""` (an empty string) returns `null`.

Note: The peculiar second requirement permits testing algorithms when they also call `document.all` with such arguments, so that testing for correct behavior requires knowing how the call behaves. This is rarely necessary.

Note: The peculiar second requirement permits testing algorithms when they also call `document.all` with such arguments, so that testing for correct behavior requires knowing how the call behaves. This is rarely necessary.

Use this property to test that ECMAScript algorithms aren't mis-implemented to treat `document.all` as being `undefined` or of type Undefined (instead of Object).

**Tests using this function must be tagged with the `IsHTMLDDA` feature so that only hosts supporting this property will run them.**
- **`agent`** - an ordinary object with the following properties:
- **`start`** - a function that takes a script source string and runs
Expand All @@ -98,10 +98,10 @@ properties of the global scope prior to test execution.
- **`leaving`** - a function that signals that the agent is done and
may be terminated (if possible).
- **`monotonicNow`** - a function that returns a value that conforms to [`DOMHighResTimeStamp`][] and is produced in such a way that its semantics conform to **[Monotonic Clock][]**.
- **`broadcast`** - a function that takes a SharedArrayBuffer and an
Int32 or BigInt and broadcasts the two values to all concurrent
agents. The function blocks until all agents have retrieved the
message. Note, this assumes that all agents that were started are
- **`broadcast`** - a function that takes a SharedArrayBuffer and an
Int32 or BigInt and broadcasts the two values to all concurrent
agents. The function blocks until all agents have retrieved the
message. Note, this assumes that all agents that were started are
still running.
- **`getReport`** - a function that reads an incoming string from any agent,
and returns it if it exists, or returns `null` otherwise.
Expand Down Expand Up @@ -208,15 +208,15 @@ an exception, or if the name of the thrown exception's constructor does not
match the specified constructor name, or if the error occurs at a phase that
differs from the indicated phase, the test must be interpreted as "failing."

The **`$DONOTEVALUATE()`** function is for use in tests that include the following meta data:
The **`$DONOTEVALUATE()`** function is for use in tests that include the following meta data:

```
negative:
phase: runtime
type: ReferenceError
```

The definition is considered "runner implementation defined" and no guarantees can be made about its behavior, therefore it is restricted to only tests that meet the criteria described above.
The definition is considered "runner implementation defined" and no guarantees can be made about its behavior, therefore it is restricted to only tests that meet the criteria described above.

*Examples:*

Expand Down Expand Up @@ -258,8 +258,11 @@ export {} from './instn-resolve-empty-export_FIXTURE.js';
### `includes`

One or more files whose content must be evaluated in the test realm's global
scope prior to test execution. These files are located within the `harness/`
directory of the Test262 project.
scope prior to test execution, after the files listed in the
[Test262-Defined Bindings](#test262-defined-bindings) section and the file
listed for the `async` flag below.
They must be included in the order given in the source.
These files are located within the `harness/` directory of the Test262 project.

*Example*

Expand Down Expand Up @@ -348,9 +351,11 @@ following strings:
```

- **`async`** The file `harness/doneprintHandle.js` must be evaluated in the
test realm's global scope prior to test execution. The test must not be
considered complete until the implementation-defined `print` function has
been invoked or some length of time has passed without any such invocation.
test realm's global scope prior to test execution, after the files listed in
the [Test262-Defined Bindings](#test262-defined-bindings) section.
The test must not be considered complete until the implementation-defined
`print` function has been invoked or some length of time has passed without
any such invocation.
In the event of a passing test run, this function will be invoked with the
string `'Test262:AsyncTestComplete'`. If invoked with a string that is
prefixed with the character sequence `Test262:AsyncTestFailure:`, the test
Expand Down