summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/annexB
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /js/src/tests/test262/annexB
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/annexB')
-rw-r--r--js/src/tests/test262/annexB/built-ins/Date/prototype/getYear/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/Date/prototype/setYear/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/Date/prototype/toGMTString/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-cross-realm-instance.js4
-rw-r--r--js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-subclass-instance.js8
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/anchor/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/big/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/blink/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/bold/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/fixed/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/fontcolor/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/fontsize/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/italics/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/link/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/small/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/strike/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/sub/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/substr/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/String/prototype/sup/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js1
-rw-r--r--js/src/tests/test262/annexB/built-ins/escape/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/built-ins/unescape/not-a-constructor.js2
-rw-r--r--js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-1.js34
-rw-r--r--js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-2.js34
-rw-r--r--js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-3.js34
-rw-r--r--js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js23
-rw-r--r--js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-no-collision.js (renamed from js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-no-collision-in-strict-mode-strict.js)17
27 files changed, 139 insertions, 54 deletions
diff --git a/js/src/tests/test262/annexB/built-ins/Date/prototype/getYear/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/Date/prototype/getYear/not-a-constructor.js
index a3936a335e..5e62df950e 100644
--- a/js/src/tests/test262/annexB/built-ins/Date/prototype/getYear/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/Date/prototype/getYear/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
let date = new Date(Date.now()); new date.getYear();
-}, '`let date = new Date(Date.now()); new date.getYear()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/Date/prototype/setYear/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/Date/prototype/setYear/not-a-constructor.js
index 906214fde4..b984983549 100644
--- a/js/src/tests/test262/annexB/built-ins/Date/prototype/setYear/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/Date/prototype/setYear/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
let date = new Date(Date.now()); new date.setYear();
-}, '`let date = new Date(Date.now()); new date.setYear()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/Date/prototype/toGMTString/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/Date/prototype/toGMTString/not-a-constructor.js
index bb6c5f412f..1ee58ec5ae 100644
--- a/js/src/tests/test262/annexB/built-ins/Date/prototype/toGMTString/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/Date/prototype/toGMTString/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
let date = new Date(Date.now()); new date.toGMTString();
-}, '`let date = new Date(Date.now()); new date.toGMTString()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-cross-realm-instance.js b/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-cross-realm-instance.js
index 5c4f9a8234..666bd56e9e 100644
--- a/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-cross-realm-instance.js
+++ b/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-cross-realm-instance.js
@@ -16,9 +16,7 @@ assert.throws(
TypeError,
function () {
RegExp.prototype.compile.call(otherRealm_regexp);
- },
- "`RegExp.prototype.compile.call(otherRealm_regexp)` throws TypeError"
-);
+ });
assert.throws(
other.TypeError,
diff --git a/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-subclass-instance.js b/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-subclass-instance.js
index 66f6e3f5a6..2bbe36f4c4 100644
--- a/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-subclass-instance.js
+++ b/js/src/tests/test262/annexB/built-ins/RegExp/prototype/compile/this-subclass-instance.js
@@ -13,16 +13,12 @@ assert.throws(
TypeError,
function () {
subclass_regexp.compile();
- },
- "`subclass_regexp.compile()` throws TypeError"
-);
+ });
assert.throws(
TypeError,
function () {
RegExp.prototype.compile.call(subclass_regexp);
- },
- "`RegExp.prototype.compile.call(subclass_regexp)` throws TypeError"
-);
+ });
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/anchor/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/anchor/not-a-constructor.js
index ca59226cbf..7935bb3faa 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/anchor/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/anchor/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.anchor();
-}, '`new String.prototype.anchor()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/big/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/big/not-a-constructor.js
index f2e5f3bfc7..7f5ab46c7b 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/big/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/big/not-a-constructor.js
@@ -24,7 +24,7 @@ assert.sameValue(isConstructor(String.prototype.big), false, 'isConstructor(Stri
assert.throws(TypeError, () => {
new String.prototype.big();
-}, '`new String.prototype.big()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/blink/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/blink/not-a-constructor.js
index 73d5488203..275fca49f8 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/blink/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/blink/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.blink();
-}, '`new String.prototype.blink()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/bold/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/bold/not-a-constructor.js
index 1f8a7a155d..bac9d503cd 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/bold/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/bold/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.bold();
-}, '`new String.prototype.bold()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/fixed/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/fixed/not-a-constructor.js
index 64fa0c534d..5199152f24 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/fixed/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/fixed/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.fixed();
-}, '`new String.prototype.fixed()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/fontcolor/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/fontcolor/not-a-constructor.js
index a5bfa4415c..93e7959b6e 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/fontcolor/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/fontcolor/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.fontcolor();
-}, '`new String.prototype.fontcolor()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/fontsize/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/fontsize/not-a-constructor.js
index d221a1348a..369d8a63ff 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/fontsize/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/fontsize/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.fontsize();
-}, '`new String.prototype.fontsize()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/italics/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/italics/not-a-constructor.js
index 4833d9b0e5..ee0efba295 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/italics/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/italics/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.italics();
-}, '`new String.prototype.italics()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/link/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/link/not-a-constructor.js
index afd8d81733..7b0d604281 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/link/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/link/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.link();
-}, '`new String.prototype.link()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/small/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/small/not-a-constructor.js
index a0a9aa6090..ca7d8b4c88 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/small/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/small/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.small();
-}, '`new String.prototype.small()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/strike/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/strike/not-a-constructor.js
index 5f7bc6cbd1..c772410ed8 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/strike/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/strike/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.strike();
-}, '`new String.prototype.strike()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/sub/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/sub/not-a-constructor.js
index 3c8b054e9a..23a9dd69d9 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/sub/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/sub/not-a-constructor.js
@@ -24,7 +24,7 @@ assert.sameValue(isConstructor(String.prototype.sub), false, 'isConstructor(Stri
assert.throws(TypeError, () => {
new String.prototype.sub();
-}, '`new String.prototype.sub()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/substr/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/substr/not-a-constructor.js
index 821d6473a4..35a5bd0121 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/substr/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/substr/not-a-constructor.js
@@ -28,7 +28,7 @@ assert.sameValue(
assert.throws(TypeError, () => {
new String.prototype.substr();
-}, '`new String.prototype.substr()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/String/prototype/sup/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/String/prototype/sup/not-a-constructor.js
index 461a34d60e..e0de689e39 100644
--- a/js/src/tests/test262/annexB/built-ins/String/prototype/sup/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/String/prototype/sup/not-a-constructor.js
@@ -24,7 +24,7 @@ assert.sameValue(isConstructor(String.prototype.sup), false, 'isConstructor(Stri
assert.throws(TypeError, () => {
new String.prototype.sup();
-}, '`new String.prototype.sup()` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js b/js/src/tests/test262/annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js
index 5e41a374eb..b121d08169 100644
--- a/js/src/tests/test262/annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js
+++ b/js/src/tests/test262/annexB/built-ins/TypedArrayConstructors/from/iterator-method-emulates-undefined.js
@@ -1,3 +1,4 @@
+// |reftest| shell-option(--enable-float16array)
// Copyright (C) 2020 Alexey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
diff --git a/js/src/tests/test262/annexB/built-ins/escape/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/escape/not-a-constructor.js
index 9fd1e0deb7..f1f3a0caa7 100644
--- a/js/src/tests/test262/annexB/built-ins/escape/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/escape/not-a-constructor.js
@@ -24,7 +24,7 @@ assert.sameValue(isConstructor(escape), false, 'isConstructor(escape) must retur
assert.throws(TypeError, () => {
new escape('');
-}, '`new escape(\'\')` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/built-ins/unescape/not-a-constructor.js b/js/src/tests/test262/annexB/built-ins/unescape/not-a-constructor.js
index 71c32f22c2..79070d3c7d 100644
--- a/js/src/tests/test262/annexB/built-ins/unescape/not-a-constructor.js
+++ b/js/src/tests/test262/annexB/built-ins/unescape/not-a-constructor.js
@@ -24,7 +24,7 @@ assert.sameValue(isConstructor(unescape), false, 'isConstructor(unescape) must r
assert.throws(TypeError, () => {
new unescape('');
-}, '`new unescape(\'\')` throws TypeError');
+});
reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-1.js b/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-1.js
new file mode 100644
index 0000000000..708e42e4ae
--- /dev/null
+++ b/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-1.js
@@ -0,0 +1,34 @@
+--> a comment
+
+// Copyright (C) 2024 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-html-like-comments
+description: >
+ A SingleLineHTMLCloseComment is allowed in the first line
+flags: [raw]
+info: |
+ InputElementHashbangOrRegExp ::
+ WhiteSpace
+ LineTerminator
+ Comment
+ CommonToken
+ HashbangComment
+ RegularExpressionLiteral
+ HTMLCloseComment
+
+ HTMLCloseComment ::
+ WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
+negative:
+ phase: runtime
+ type: Test262Error
+---*/
+
+// Because this test concerns the interpretation of non-executable character
+// sequences within ECMAScript source code, special care must be taken to
+// ensure that executable code is evaluated as expected.
+//
+// Express the intended behavior by intentionally throwing an error; this
+// guarantees that test runners will only consider the test "passing" if
+// executable sequences are correctly interpreted as such.
+throw new Test262Error("This is not in a comment");
diff --git a/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-2.js b/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-2.js
new file mode 100644
index 0000000000..0b68aa0f6f
--- /dev/null
+++ b/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-2.js
@@ -0,0 +1,34 @@
+ --> a comment
+
+// Copyright (C) 2024 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-html-like-comments
+description: >
+ A SingleLineHTMLCloseComment is allowed in the first line when preceeded by spaces
+flags: [raw]
+info: |
+ InputElementHashbangOrRegExp ::
+ WhiteSpace
+ LineTerminator
+ Comment
+ CommonToken
+ HashbangComment
+ RegularExpressionLiteral
+ HTMLCloseComment
+
+ HTMLCloseComment ::
+ WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
+negative:
+ phase: runtime
+ type: Test262Error
+---*/
+
+// Because this test concerns the interpretation of non-executable character
+// sequences within ECMAScript source code, special care must be taken to
+// ensure that executable code is evaluated as expected.
+//
+// Express the intended behavior by intentionally throwing an error; this
+// guarantees that test runners will only consider the test "passing" if
+// executable sequences are correctly interpreted as such.
+throw new Test262Error("This is not in a comment");
diff --git a/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-3.js b/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-3.js
new file mode 100644
index 0000000000..d638fd5080
--- /dev/null
+++ b/js/src/tests/test262/annexB/language/comments/single-line-html-close-first-line-3.js
@@ -0,0 +1,34 @@
+/* a comment */ /*another comment*/--> a comment
+
+// Copyright (C) 2024 Igalia, S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-html-like-comments
+description: >
+ A SingleLineHTMLCloseComment is allowed in the first line when preceeded by spaces and single-line block comments
+flags: [raw]
+info: |
+ InputElementHashbangOrRegExp ::
+ WhiteSpace
+ LineTerminator
+ Comment
+ CommonToken
+ HashbangComment
+ RegularExpressionLiteral
+ HTMLCloseComment
+
+ HTMLCloseComment ::
+ WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt]
+negative:
+ phase: runtime
+ type: Test262Error
+---*/
+
+// Because this test concerns the interpretation of non-executable character
+// sequences within ECMAScript source code, special care must be taken to
+// ensure that executable code is evaluated as expected.
+//
+// Express the intended behavior by intentionally throwing an error; this
+// guarantees that test runners will only consider the test "passing" if
+// executable sequences are correctly interpreted as such.
+throw new Test262Error("This is not in a comment");
diff --git a/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js b/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js
deleted file mode 100644
index 58d5a125b5..0000000000
--- a/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2023 Alexey Shvayka. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-esid: sec-globaldeclarationinstantiation
-description: Let binding collision with existing var declaration that was created for hoisted function.
-info: |
- [...]
- 3. For each element name of lexNames, do
- a. If env.HasVarDeclaration(name) is true, throw a SyntaxError exception.
-flags: [noStrict]
----*/
-
-eval('if (true) { function test262Fn() {} }');
-
-assert.throws(SyntaxError, function() {
- $262.evalScript('var x; let test262Fn;');
-});
-
-assert.throws(ReferenceError, function() {
- x;
-}, 'no bindings created');
-
-reportCompare(0, 0);
diff --git a/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-no-collision-in-strict-mode-strict.js b/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-no-collision.js
index da859c843d..643b11831d 100644
--- a/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-no-collision-in-strict-mode-strict.js
+++ b/js/src/tests/test262/annexB/language/eval-code/direct/script-decl-lex-no-collision.js
@@ -1,10 +1,11 @@
-'use strict';
// Copyright (C) 2023 Alexey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-globaldeclarationinstantiation
-description: No let binding collision with existing var declaration due to strict-mode eval().
+description: No let binding collision with existing var declaration due to eval().
info: |
+ In strict mode:
+
PerformEval ( x, strictCaller, direct )
[...]
@@ -12,7 +13,17 @@ info: |
a. Let lexEnv be NewDeclarativeEnvironment(runningContext's LexicalEnvironment).
[...]
18. If strictEval is true, set varEnv to lexEnv.
-flags: [onlyStrict]
+
+ In sloppy mode:
+
+ GlobalDeclarationInstantiation ( script, env )
+
+ [...]
+ 3. For each element name of lexNames, do
+ a. If env.HasLexicalDeclaration(name) is true, throw a SyntaxError exception.
+ b. Let hasRestrictedGlobal be ? env.HasRestrictedGlobalProperty(name).
+ c. NOTE: Global var and function bindings (except those that are introduced by non-strict direct eval) are non-configurable and are therefore restricted global properties.
+ d. If hasRestrictedGlobal is true, throw a SyntaxError exception.
---*/
eval('if (true) { function test262Fn() {} }');