summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch12/12.10/12.10.1
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch12/12.10/12.10.1
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch12/12.10/12.10.1')
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-1-s.js31
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-10-s.js30
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11-s.js23
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11gs.js16
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-12-s.js26
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-13-s.js19
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-14-s.js24
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-15-s.js23
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-16-s.js23
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-2-s.js32
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-3-s.js32
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-4-s.js27
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-5-s.js19
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-7-s.js28
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-8-s.js28
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-9-s.js28
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/browser.js0
-rw-r--r--js/src/tests/test262/ch12/12.10/12.10.1/shell.js0
18 files changed, 409 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-1-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-1-s.js
new file mode 100644
index 000000000..3c042e412
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-1-s.js
@@ -0,0 +1,31 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-1-s.js
+ * @description with statement in strict mode throws SyntaxError (strict function)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ try {
+ // wrapping it in eval since this needs to be a syntax error. The
+ // exception thrown must be a SyntaxError exception.
+ eval("\
+ function f() {\
+ \'use strict\';\
+ var o = {}; \
+ with (o) {};\
+ }\
+ ");
+ return false;
+ }
+ catch (e) {
+ return(e instanceof SyntaxError);
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-10-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-10-s.js
new file mode 100644
index 000000000..4e470b517
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-10-s.js
@@ -0,0 +1,30 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-10-s.js
+ * @description with statement in strict mode throws SyntaxError (eval, where the container function is strict)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ 'use strict';
+
+ // wrapping it in eval since this needs to be a syntax error. The
+ // exception thrown must be a SyntaxError exception. Note that eval
+ // inherits the strictness of its calling context.
+ try {
+ eval("\
+ var o = {};\
+ with (o) {}\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError);
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11-s.js
new file mode 100644
index 000000000..3c4e81daa
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-11-s.js
+ * @description Strict Mode - SyntaxError is thrown when using WithStatement in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("with ({}) { throw new Error();}");
+
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11gs.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11gs.js
new file mode 100644
index 000000000..b40b37236
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-11gs.js
@@ -0,0 +1,16 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-11gs.js
+ * @description Strict Mode - SyntaxError is thrown when using with statement
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+
+"use strict";
+throw NotEarlyError;
+with ({}) { }
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-12-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-12-s.js
new file mode 100644
index 000000000..0f327297d
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-12-s.js
@@ -0,0 +1,26 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-12-s.js
+ * @description with statement in strict mode throws SyntaxError (strict eval)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ try {
+ eval("\
+ 'use strict'; \
+ var o = {}; \
+ with (o) {}\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError) ;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-13-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-13-s.js
new file mode 100644
index 000000000..39d56659e
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-13-s.js
@@ -0,0 +1,19 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-13-s.js
+ * @description Strict Mode - SyntaxError isn't thrown when WithStatement body is in strict mode code
+ * @noStrict
+ */
+
+
+function testcase() {
+ with ({}) {
+ "use strict";
+ }
+ return true;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-14-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-14-s.js
new file mode 100644
index 000000000..0e7e685b7
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-14-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-14-s.js
+ * @description Strict Mode - SyntaxError is thrown when the getter of a literal object utilizes WithStatement
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var obj = { get: function (a) { with(a){} } }; ");
+
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-15-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-15-s.js
new file mode 100644
index 000000000..8621631f6
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-15-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-15-s.js
+ * @description Strict Mode - SyntaxError is thrown when the RHS of a dot property assignment utilizes WithStatement
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var obj = {}; obj.get = function (a) { with(a){} }; ");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-16-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-16-s.js
new file mode 100644
index 000000000..e798b5715
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-16-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-16-s.js
+ * @description Strict Mode - SyntaxError is thrown when the RHS of an object indexer assignment utilizes WithStatement
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ try {
+ eval("var obj = {}; obj['get'] = function (a) { with(a){} }; ");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-2-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-2-s.js
new file mode 100644
index 000000000..211a1386e
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-2-s.js
@@ -0,0 +1,32 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-2-s.js
+ * @description with statement in strict mode throws SyntaxError (nested function where container is strict)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ try {
+ // wrapping it in eval since this needs to be a syntax error. The
+ // exception thrown must be a SyntaxError exception.
+ eval("\
+ function foo() {\
+ \'use strict\'; \
+ function f() {\
+ var o = {}; \
+ with (o) {};\
+ }\
+ }\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError);
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-3-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-3-s.js
new file mode 100644
index 000000000..8b0d2961b
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-3-s.js
@@ -0,0 +1,32 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-3-s.js
+ * @description with statement in strict mode throws SyntaxError (nested strict function)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ try {
+ // wrapping it in eval since this needs to be a syntax error. The
+ // exception thrown must be a SyntaxError exception.
+ eval("\
+ function foo() {\
+ function f() {\
+ \'use strict\'; \
+ var o = {}; \
+ with (o) {};\
+ }\
+ }\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError);
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-4-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-4-s.js
new file mode 100644
index 000000000..adb09673b
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-4-s.js
@@ -0,0 +1,27 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-4-s.js
+ * @description with statement in strict mode throws SyntaxError (strict Function)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ try {
+ var f = Function("\
+ \'use strict\'; \
+ var o = {}; \
+ with (o) {};\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError);
+
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-5-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-5-s.js
new file mode 100644
index 000000000..3a1ea1ad8
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-5-s.js
@@ -0,0 +1,19 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-5-s.js
+ * @description with statement allowed in nested Function even if its container Function is strict)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ Function("\'use strict\'; var f1 = Function( \"var o = {}; with (o) {};\")");
+ return true;
+
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-7-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-7-s.js
new file mode 100644
index 000000000..0ceb2097e
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-7-s.js
@@ -0,0 +1,28 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-7-s.js
+ * @description with statement in strict mode throws SyntaxError (function expression, where the container function is directly evaled from strict code)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ 'use strict';
+
+ try {
+ eval("var f = function () {\
+ var o = {}; \
+ with (o) {}; \
+ }\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError);
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-8-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-8-s.js
new file mode 100644
index 000000000..55cfa8e4e
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-8-s.js
@@ -0,0 +1,28 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-8-s.js
+ * @description with statement in strict mode throws SyntaxError (function expression, where the container Function is strict)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ try {
+ Function("\
+ \'use strict\'; \
+ var f1 = function () {\
+ var o = {}; \
+ with (o) {}; \
+ }\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError);
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-9-s.js b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-9-s.js
new file mode 100644
index 000000000..b0e29e256
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/12.10.1-9-s.js
@@ -0,0 +1,28 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch12/12.10/12.10.1/12.10.1-9-s.js
+ * @description with statement in strict mode throws SyntaxError (strict function expression)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ try {
+ eval("\
+ var f = function () {\
+ \'use strict\';\
+ var o = {}; \
+ with (o) {}; \
+ }\
+ ");
+ return false;
+ }
+ catch (e) {
+ return (e instanceof SyntaxError) ;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/browser.js b/js/src/tests/test262/ch12/12.10/12.10.1/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/browser.js
diff --git a/js/src/tests/test262/ch12/12.10/12.10.1/shell.js b/js/src/tests/test262/ch12/12.10/12.10.1/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch12/12.10/12.10.1/shell.js