summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js')
-rw-r--r--js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js b/js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js
new file mode 100644
index 0000000000..64a6f6803c
--- /dev/null
+++ b/js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js
@@ -0,0 +1,43 @@
+// |reftest| module
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: Parent completion orderings match the synchronous module behavior
+info: |
+ 6.2.4 AsyncModuleExecutionFulfilled ( module )
+
+ [...]
+ 5. Let _execList_ be a new empty List.
+ 6. Perform ! GatherAsyncParentCompletions(_module_, _execList_).
+ 7. Let _sortedExecList_ be a List of elements that are the elements of
+ _execList_, in the order in which they had their [[AsyncEvaluating]]
+ fields set to *true* in InnerModuleEvaluation.
+ 8. Assert: All elements of _sortedExecList_ have their [[AsyncEvaluating]]
+ field set to *true*, [[PendingAsyncDependencies]] field set to 0 and
+ [[EvaluationError]] field set to *undefined*.
+ [...]
+
+ Dependency graph for this test:
+
+ dfs-invariant.js
+ .-----------------------------------+-------.
+ | | v
+ | | dfs-invariant-indirect_FIXTURE.js
+ | .---|----------------------'
+ v v v
+ dfs-invariant-direct-1_FIXTURE.js dfs-invariant-direct-2_FIXTURE.js
+ '--------. .--------'
+ v v
+ dfs-invariant-async_FIXTURE.js
+esid: sec-moduleevaluation
+flags: [module]
+features: [top-level-await, globalThis]
+---*/
+
+import './dfs-invariant-direct-1_FIXTURE.js';
+import './dfs-invariant-direct-2_FIXTURE.js';
+import './dfs-invariant-indirect_FIXTURE.js';
+
+assert.sameValue(globalThis.test262, 'async:direct-1:direct-2:indirect');
+
+reportCompare(0, 0);