diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /js/src/tests/non262/Temporal | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/non262/Temporal')
3 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/non262/Temporal/PlainDate/browser.js b/js/src/tests/non262/Temporal/PlainDate/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/non262/Temporal/PlainDate/browser.js diff --git a/js/src/tests/non262/Temporal/PlainDate/from-with-modified-array-iterator-state.js b/js/src/tests/non262/Temporal/PlainDate/from-with-modified-array-iterator-state.js new file mode 100644 index 0000000000..ac0febc1e6 --- /dev/null +++ b/js/src/tests/non262/Temporal/PlainDate/from-with-modified-array-iterator-state.js @@ -0,0 +1,22 @@ +// |reftest| skip-if(!this.hasOwnProperty("Temporal")) + +const ArrayIteratorPrototype = Object.getPrototypeOf([][Symbol.iterator]()); + +// Modify the ArrayIteratorPrototype prototype chain to disable optimisations. +Object.setPrototypeOf(ArrayIteratorPrototype, {}); + +let calendar = new Temporal.Calendar("iso8601"); + +let dateLike = { + calendar, + day: 1, + month: 1, + year: 0, +}; + +let result = Temporal.PlainDate.from(dateLike); + +assertEq(result.toString(), "0000-01-01"); + +if (typeof reportCompare === "function") + reportCompare(true, true); diff --git a/js/src/tests/non262/Temporal/PlainDate/shell.js b/js/src/tests/non262/Temporal/PlainDate/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/non262/Temporal/PlainDate/shell.js |