summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype')
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/Symbol.toStringTag.js27
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/browser.js0
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/constructor.js27
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/extensibility.js16
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js30
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prop-desc.js21
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prototype.js28
-rw-r--r--js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/shell.js0
8 files changed, 149 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/Symbol.toStringTag.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/Symbol.toStringTag.js
new file mode 100644
index 0000000000..971eb46991
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/Symbol.toStringTag.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2018 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-asyncgeneratorfunction-prototype-tostringtag
+description: >
+ `Symbol.toStringTag` property descriptor
+info: |
+ The initial value of the @@toStringTag property is the String
+ value "AsyncGeneratorFunction".
+
+ This property has the attributes { [[Writable]]: false,
+ [[Enumerable]]: false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+features: [async-iteration, Symbol.toStringTag]
+---*/
+
+var AsyncGeneratorFunctionPrototype = Object.getPrototypeOf(async function*() {});
+
+verifyProperty(AsyncGeneratorFunctionPrototype, Symbol.toStringTag, {
+ value: 'AsyncGeneratorFunction',
+ enumerable: false,
+ writable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/browser.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/browser.js
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/constructor.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/constructor.js
new file mode 100644
index 0000000000..a8cc755656
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/constructor.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2018 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-asyncgeneratorfunction-prototype-constructor
+description: >
+ `constructor` property of the AsyncGeneratorFunction.prototype object
+info: |
+ The initial value of AsyncGeneratorFunction.prototype.constructor is the intrinsic
+ object %AsyncGeneratorFunction%.
+
+ This property has the attributes { [[Writable]]: false, [[Enumerable]]:
+ false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+features: [async-iteration]
+---*/
+
+var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor;
+
+assert.sameValue(AsyncGeneratorFunction.prototype.constructor, AsyncGeneratorFunction);
+
+verifyProperty(AsyncGeneratorFunction.prototype, "constructor", {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/extensibility.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/extensibility.js
new file mode 100644
index 0000000000..ccc93092b1
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/extensibility.js
@@ -0,0 +1,16 @@
+// Copyright (C) 2018 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-properties-of-asyncgenerator-prototype
+description: Object extensibility
+info: |
+ The initial value of the [[Extensible]] internal slot of the
+ AsyncGeneratorFunction prototype object is true.
+features: [async-iteration]
+---*/
+
+var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor;
+
+assert(Object.isExtensible(AsyncGeneratorFunction.prototype));
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js
new file mode 100644
index 0000000000..812d1d2f71
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/not-callable.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2020 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-properties-of-asyncgeneratorfunction-prototype
+description: >
+ %AsyncGeneratorFunction.prototype% is an ordinary non-callable object.
+info: |
+ Properties of the AsyncGeneratorFunction Prototype Object
+
+ The AsyncGeneratorFunction prototype object:
+
+ [...]
+ * is an ordinary object.
+ * is not a function object and does not have an [[ECMAScriptCode]] internal slot
+ or any other of the internal slots listed in Table 28 or Table 75.
+features: [async-iteration]
+---*/
+
+var AsyncGeneratorFunctionPrototype = Object.getPrototypeOf(async function* () {});
+
+assert.sameValue(typeof AsyncGeneratorFunctionPrototype, "object");
+assert.throws(TypeError, function() {
+ AsyncGeneratorFunctionPrototype();
+});
+
+assert(!AsyncGeneratorFunctionPrototype.hasOwnProperty("length"), "length");
+assert(!AsyncGeneratorFunctionPrototype.hasOwnProperty("name"), "name");
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prop-desc.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prop-desc.js
new file mode 100644
index 0000000000..eed1bb1934
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prop-desc.js
@@ -0,0 +1,21 @@
+// Copyright (C) 2018 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: AsyncGeneratorFunction.prototype property descriptor
+esid: sec-asyncgeneratorfunction-prototype
+info: |
+ This property has the attributes { [[Writable]]: false, [[Enumerable]]:
+ false, [[Configurable]]: false }.
+includes: [propertyHelper.js]
+features: [async-iteration]
+---*/
+
+var AsyncGeneratorFunction = Object.getPrototypeOf(async function* () {}).constructor;
+
+verifyProperty(AsyncGeneratorFunction, "prototype", {
+ enumerable: false,
+ writable: false,
+ configurable: false,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prototype.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prototype.js
new file mode 100644
index 0000000000..b551a6c255
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/prototype.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2018 Valerie Young. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-asyncgeneratorfunction-prototype-prototype
+description: >
+ The value of AsyncGeneratorFunction.prototype.prototype is the
+ %AsyncGeneratorPrototype% intrinsic object.
+
+ This property has the attributes { [[Writable]]: false,
+ [[Enumerable]]: false, [[Configurable]]: true }.
+includes: [propertyHelper.js]
+features: [async-iteration]
+---*/
+
+var AsyncGeneratorFunctionPrototype = Object.getPrototypeOf(async function*() {});
+
+assert.sameValue(
+ AsyncGeneratorFunctionPrototype.prototype,
+ Object.getPrototypeOf(async function*() {}.prototype)
+);
+
+verifyProperty(AsyncGeneratorFunctionPrototype, "prototype", {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/shell.js b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/built-ins/AsyncGeneratorFunction/prototype/shell.js