diff --git a/test/language/import/import-defer/deferred-namespace-object/dep-defer-ns_FIXTURE.js b/test/language/import/import-defer/deferred-namespace-object/dep-defer-ns_FIXTURE.js index fceef1b0553..fff88eceb56 100644 --- a/test/language/import/import-defer/deferred-namespace-object/dep-defer-ns_FIXTURE.js +++ b/test/language/import/import-defer/deferred-namespace-object/dep-defer-ns_FIXTURE.js @@ -1,6 +1,6 @@ // Copyright (C) 2024 Igalia, S.L. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -import defer * as depDeferredNamespace from "./dep.js"; +import defer * as depDeferredNamespace from "./dep_FIXTURE.js"; export { depDeferredNamespace }; diff --git a/test/language/import/import-defer/deferred-namespace-object/identity.js b/test/language/import/import-defer/deferred-namespace-object/identity.js index f8d459ebc08..519c96dd84f 100644 --- a/test/language/import/import-defer/deferred-namespace-object/identity.js +++ b/test/language/import/import-defer/deferred-namespace-object/identity.js @@ -26,6 +26,7 @@ info: | 1. ... 1. Return _M_. +flags: [module] features: [import-defer] ---*/ diff --git a/test/language/import/import-defer/deferred-namespace-object/object-properties.js b/test/language/import/import-defer/deferred-namespace-object/object-properties.js index fd83b62d6a9..ad8b7280f0c 100644 --- a/test/language/import/import-defer/deferred-namespace-object/object-properties.js +++ b/test/language/import/import-defer/deferred-namespace-object/object-properties.js @@ -18,8 +18,9 @@ info: | [[IsExtensible]] ( ) 1. Return false. +flags: [module] features: [import-defer] -includes: [propertyHelper.js] +includes: [propertyHelper.js, deepEqual.js] ---*/ import defer * as ns from "./dep_FIXTURE.js"; @@ -30,8 +31,8 @@ assert(Reflect.isExtensible(ns) === false, "Deferred namespaces are not extensib assert(Reflect.preventExtensions(ns) === true, "Deferred namespaces can made non-extensible"); assert(Reflect.getPrototypeOf(ns) === null, "Deferred namespaces have a null prototype"); -asserts(Reflect.setPrototypeOf(ns, {}) === false, "Deferred namespaces' prototype cannot be changed"); -asserts(Reflect.setPrototypeOf(ns, null) === true, "Deferred namespaces' prototype can be 'set' to null"); +assert(Reflect.setPrototypeOf(ns, {}) === false, "Deferred namespaces' prototype cannot be changed"); +assert(Reflect.setPrototypeOf(ns, null) === true, "Deferred namespaces' prototype can be 'set' to null"); assert.throws(TypeError, () => Reflect.apply(ns, null, []), "Deferred namespaces are not callable"); assert.throws(TypeError, () => Reflect.construct(ns, null, []), "Deferred namespaces are not constructable"); diff --git a/test/language/import/import-defer/errors/get-other-while-dep-evaluating/main.js b/test/language/import/import-defer/errors/get-other-while-dep-evaluating/main.js index b058095d7d3..d27fefb061a 100644 --- a/test/language/import/import-defer/errors/get-other-while-dep-evaluating/main.js +++ b/test/language/import/import-defer/errors/get-other-while-dep-evaluating/main.js @@ -31,6 +31,7 @@ info: | 1. Return *false*. 1. Return *true*. +flags: [module] features: [import-defer] ---*/ diff --git a/test/language/import/import-defer/errors/get-other-while-evaluating/main.js b/test/language/import/import-defer/errors/get-other-while-evaluating/main.js index 250f23b2617..5eb76bc5279 100644 --- a/test/language/import/import-defer/errors/get-other-while-evaluating/main.js +++ b/test/language/import/import-defer/errors/get-other-while-evaluating/main.js @@ -31,6 +31,7 @@ info: | 1. Return *false*. 1. Return *true*. +flags: [module] features: [import-defer] ---*/ diff --git a/test/language/import/import-defer/errors/get-self-while-defer-evaluating/main.js b/test/language/import/import-defer/errors/get-self-while-defer-evaluating/main.js index 9828b6783cc..dc5f2b51b89 100644 --- a/test/language/import/import-defer/errors/get-self-while-defer-evaluating/main.js +++ b/test/language/import/import-defer/errors/get-self-while-defer-evaluating/main.js @@ -31,6 +31,7 @@ info: | 1. Return *false*. 1. Return *true*. +flags: [module] features: [import-defer] ---*/ diff --git a/test/language/import/import-defer/errors/get-self-while-evaluating.js b/test/language/import/import-defer/errors/get-self-while-evaluating.js index 4010214eae3..6fbd0c27b3e 100644 --- a/test/language/import/import-defer/errors/get-self-while-evaluating.js +++ b/test/language/import/import-defer/errors/get-self-while-evaluating.js @@ -31,9 +31,10 @@ info: | 1. Return *false*. 1. Return *true*. +flags: [module] features: [import-defer] ---*/ -import defer * self from "./get-self-while-evaluating.js"; +import defer * as self from "./get-self-while-evaluating.js"; assert.throws(TypeError, () => self.foo); diff --git a/test/language/import/import-defer/errors/module-throws/defer-import-after-evaluation.js b/test/language/import/import-defer/errors/module-throws/defer-import-after-evaluation.js index 21f81417fda..af34278238d 100644 --- a/test/language/import/import-defer/errors/module-throws/defer-import-after-evaluation.js +++ b/test/language/import/import-defer/errors/module-throws/defer-import-after-evaluation.js @@ -24,6 +24,7 @@ info: | 1. Return ThrowCompletion(_promise_.[[PromiseResult]]). 1. ... +flags: [module] features: [import-defer, top-level-await] ---*/ diff --git a/test/language/import/import-defer/errors/module-throws/third-party-evaluation-after-defer-import.js b/test/language/import/import-defer/errors/module-throws/third-party-evaluation-after-defer-import.js index f86131c4c05..0c22ef4a576 100644 --- a/test/language/import/import-defer/errors/module-throws/third-party-evaluation-after-defer-import.js +++ b/test/language/import/import-defer/errors/module-throws/third-party-evaluation-after-defer-import.js @@ -24,6 +24,7 @@ info: | 1. Return ThrowCompletion(_promise_.[[PromiseResult]]). 1. ... +flags: [module] features: [import-defer, top-level-await] ---*/ diff --git a/test/language/import/import-defer/errors/module-throws/trigger-evaluation.js b/test/language/import/import-defer/errors/module-throws/trigger-evaluation.js index 5c0c8991765..34b790c6c27 100644 --- a/test/language/import/import-defer/errors/module-throws/trigger-evaluation.js +++ b/test/language/import/import-defer/errors/module-throws/trigger-evaluation.js @@ -24,10 +24,11 @@ info: | 1. Return ThrowCompletion(_promise_.[[PromiseResult]]). 1. ... +flags: [module] features: [import-defer] ---*/ -import defer * as ns "./throws_FIXTURE.js"; +import defer * as ns from "./throws_FIXTURE.js"; assert.throws(URIError, () => ns.foo, "Evaluation errors are thrown when evaluating"); assert.throws(URIError, () => ns.foo, "Evaluation errors are thrown for already evaluated modules"); diff --git a/test/language/import/import-defer/errors/resolution-error/import-defer-of-syntax-error-fails.js b/test/language/import/import-defer/errors/resolution-error/import-defer-of-syntax-error-fails.js index 7766d404922..1104bf6cbba 100644 --- a/test/language/import/import-defer/errors/resolution-error/import-defer-of-syntax-error-fails.js +++ b/test/language/import/import-defer/errors/resolution-error/import-defer-of-syntax-error-fails.js @@ -9,11 +9,12 @@ info: | LoadRequestedModules ([ _hostDefined_ ]) - just notice that it does not check if the module is deferred +flags: [module] features: [import-defer] negative: phase: resolution - type: SyntaxErrpr + type: SyntaxError ---*/ import defer * as ns "./resolution-error_FIXTURE.js"; diff --git a/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js b/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js index 3272e8daa67..09520de2072 100644 --- a/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js +++ b/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js @@ -9,11 +9,12 @@ info: | LoadRequestedModules ([ _hostDefined_ ]) - just notice that it does not check if the module is deferred +flags: [module] features: [import-defer] negative: phase: resolution - type: SyntaxErrpr + type: SyntaxError ---*/ import defer * as ns "./syntax-error_FIXTURE.js"; diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-get-symbol.js b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-get-symbol.js index 56a4121b511..e8ed9700c1b 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-get-symbol.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-get-symbol.js @@ -12,12 +12,13 @@ info: | 1. If _O_.[[Deferred]] is **true**, perform ? EnsureDeferredNamespaceEvaluation(_O_). 1. ... +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-getPrototypeOf.js b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-getPrototypeOf.js index 36eb68d02af..c36ac7c5fcc 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-getPrototypeOf.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-getPrototypeOf.js @@ -9,12 +9,13 @@ info: | [[GetPrototypeOf]] ( ) 1. Return **null**. +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-isExtensible.js b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-isExtensible.js index c4e2dfe4f50..ff815565c76 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-isExtensible.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-isExtensible.js @@ -9,12 +9,13 @@ info: | [[IsExtensible]] ( ) 1. Return **false**. +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-preventExtensions.js b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-preventExtensions.js index c914366a37a..5ceb8b3a804 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-preventExtensions.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-preventExtensions.js @@ -9,12 +9,13 @@ info: | [[PreventExtensions]] ( ) 1. Return **true**. +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-set.js b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-set.js index 6eb92f7e277..738a53b747b 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-set.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-set.js @@ -9,16 +9,21 @@ info: | [[Set]] ( _P_, _V_, _Receiver_ ) 1. Return **false**. +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); -ns1.foo = 2; -ns1.ns_1_2 = 3; +try { + ns1.foo = 2; +} catch {} +try { + ns1.ns_1_2 = 3; +} catch {} -assert(globalThis.evaluations.length === 0, "[[Get]] of a symbol does not trigger evaluation"); +assert(globalThis.evaluations.length === 0, "[[Set]] of a symbol does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-setPrototypeOf.js b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-setPrototypeOf.js index dcb017eadb1..a0953218df5 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-ignore-setPrototypeOf.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-ignore-setPrototypeOf.js @@ -9,12 +9,13 @@ info: | [[SetPrototypeOf]] ( _V_ ) 1. Return ! SetImmutablePrototype(_O_, _V_). +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/evaluation-trigger-get-string.js b/test/language/import/import-defer/evaluation-sync/evaluation-trigger-get-string.js index 0531d798206..528851ba2ab 100644 --- a/test/language/import/import-defer/evaluation-sync/evaluation-trigger-get-string.js +++ b/test/language/import/import-defer/evaluation-sync/evaluation-trigger-get-string.js @@ -12,12 +12,13 @@ info: | 1. If _O_.[[Deferred]] is **true**, perform ? EnsureDeferredNamespaceEvaluation(_O_). 1. ... +flags: [module] features: [import-defer] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/import-defer-does-not-evaluate.js b/test/language/import/import-defer/evaluation-sync/import-defer-does-not-evaluate.js index b06ad64c126..bb49ef0938e 100644 --- a/test/language/import/import-defer/evaluation-sync/import-defer-does-not-evaluate.js +++ b/test/language/import/import-defer/evaluation-sync/import-defer-does-not-evaluate.js @@ -23,12 +23,14 @@ info: | 1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_). 1. ... +flags: [module] features: [import-defer] +includes: [deepEqual.js] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; assert(globalThis.evaluations.length === 0, "import defer does not trigger evaluation"); diff --git a/test/language/import/import-defer/evaluation-sync/module-imported-defer-and-eager.js b/test/language/import/import-defer/evaluation-sync/module-imported-defer-and-eager.js index f0361b41052..53552052e3b 100644 --- a/test/language/import/import-defer/evaluation-sync/module-imported-defer-and-eager.js +++ b/test/language/import/import-defer/evaluation-sync/module-imported-defer-and-eager.js @@ -37,12 +37,14 @@ info: | 1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_). 1. ... +flags: [module] features: [import-defer] +includes: [deepEqual.js] ---*/ import "./setup_FIXTURE.js"; -import defer * as ns1 "./dep-1_FIXTURE.js"; +import defer * as ns1 from "./dep-1_FIXTURE.js"; import "./dep-2_FIXTURE.js"; import "./dep-1_FIXTURE.js"; diff --git a/test/language/import/import-defer/syntax/import-attributes.js b/test/language/import/import-defer/syntax/import-attributes.js index 56f7c8a93df..56b52d5da04 100644 --- a/test/language/import/import-defer/syntax/import-attributes.js +++ b/test/language/import/import-defer/syntax/import-attributes.js @@ -14,6 +14,7 @@ info: | NameSpaceImport : `*` `as` ImportedBinding +flags: [module] features: [import-defer] ---*/ diff --git a/test/language/import/import-defer/syntax/valid-default-binding-named-defer.js b/test/language/import/import-defer/syntax/valid-default-binding-named-defer.js index a604acf2c5d..16743bac5b6 100644 --- a/test/language/import/import-defer/syntax/valid-default-binding-named-defer.js +++ b/test/language/import/import-defer/syntax/valid-default-binding-named-defer.js @@ -21,6 +21,7 @@ info: | ImportedBinding : BindingIdentifier[~Yield, +Await] +flags: [module] features: [import-defer] ---*/ diff --git a/test/language/import/import-defer/syntax/valid-defer-namespace.js b/test/language/import/import-defer/syntax/valid-defer-namespace.js index 7eab55f62ca..2cf3637e1dc 100644 --- a/test/language/import/import-defer/syntax/valid-defer-namespace.js +++ b/test/language/import/import-defer/syntax/valid-defer-namespace.js @@ -14,6 +14,7 @@ info: | NameSpaceImport : `*` `as` ImportedBinding +flags: [module] features: [import-defer] ---*/