summaryrefslogtreecommitdiff
path: root/external/contributions/Microsoft/ietc_262modified/chapter12/12.14
diff options
context:
space:
mode:
authorDavid Fugate <dfugate@microsoft.com>2011-09-25 12:14:01 -0700
committerDavid Fugate <dfugate@microsoft.com>2011-09-25 12:14:01 -0700
commit79a1c6c96b4fb24e429f60beb0b9f6840ce4b27f (patch)
tree7a9ee453960cc74dce42cd81f2c6c31418caadb5 /external/contributions/Microsoft/ietc_262modified/chapter12/12.14
parentb81a5d9a03f8581f95192547f5db08c5e2238392 (diff)
downloadtest262-79a1c6c96b4fb24e429f60beb0b9f6840ce4b27f.tar.gz
external/contributions/Microsoft/ietc_262modified/* consists of Microsoft's test262
contributions which have been modified (generally based on bug feedback). Doing this as we don't want to modify the original contribution.
Diffstat (limited to 'external/contributions/Microsoft/ietc_262modified/chapter12/12.14')
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-1.js41
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-10.js48
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-11.js50
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-12.js48
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-13.js59
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-14.js47
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-15.js49
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-16.js53
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-2.js42
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-3.js49
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-4.js53
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-5.js52
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-6.js52
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-7.js62
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-8.js53
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-9.js49
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1-s.js46
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1gs.js3
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-2-s.js46
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-3-s.js54
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-4-s.js44
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-5-s.js44
-rw-r--r--external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-6-s.js44
23 files changed, 1088 insertions, 0 deletions
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-1.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-1.js
new file mode 100644
index 000000000..0ed1d6bf8
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "12.14-1",
+
+path: "TestCases/chapter12/12.14/12.14-1.js",
+
+description: "catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter",
+
+test: function testcase() {
+ foo = "prior to throw";
+ try {
+ throw new Error();
+ }
+ catch (foo) {
+ var foo = "initializer in catch";
+ }
+ return foo === "prior to throw";
+
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-10.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-10.js
new file mode 100644
index 000000000..98e5103af
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-10.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-10",
+
+path: "TestCases/chapter12/12.14/12.14-10.js",
+
+description: "catch introduces scope - name lookup finds function parameter",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o, x) {
+ try {
+ throw o;
+ }
+ catch (e) {
+ return x;
+ }
+ }
+
+ return innerf(o, 42);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-11.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-11.js
new file mode 100644
index 000000000..0f7c8e75b
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-11",
+
+path: "TestCases/chapter12/12.14/12.14-11.js",
+
+description: "catch introduces scope - name lookup finds inner variable",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o) {
+ var x = 42;
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-12.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-12.js
new file mode 100644
index 000000000..1b7c4e7a3
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-12.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-12",
+
+path: "TestCases/chapter12/12.14/12.14-12.js",
+
+description: "catch introduces scope - name lookup finds property",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o) {
+ try {
+ throw o;
+ }
+ catch (e) {
+ return e.x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({x:42}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-13.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-13.js
new file mode 100644
index 000000000..49b16fe8d
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-13.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-13",
+
+path: "TestCases/chapter12/12.14/12.14-13.js",
+
+description: "catch introduces scope - updates are based on scope",
+
+test: function testcase() {
+ var res1 = false;
+ var res2 = false;
+ var res3 = false;
+
+ var x_12_14_13 = 'local';
+ try {
+ function foo() {
+ this.x_12_14_13 = 'instance';
+ }
+
+ try {
+ throw foo;
+ }
+ catch (e) {
+ res1 = (x_12_14_13 === 'local');
+ e();
+ res2 = (x_12_14_13 === 'local');
+ }
+ res3 = (x_12_14_13 === 'local');
+
+ if (res1 === true &&
+ res2 === true &&
+ res3 === true) {
+ return true;
+ }
+ } finally {
+ delete this.x_12_14_13;
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-14.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-14.js
new file mode 100644
index 000000000..7ad21e2d0
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "12.14-14",
+
+ path: "TestCases/chapter12/12.14/12.14-14.js",
+
+ description: "Exception object is a function, when an exception parameter is called as a function in catch block, global object is passed as the this value",
+
+ test: function testcase() {
+ try {
+ throw function () {
+ this._12_14_14_foo = "test";
+ };
+ return false;
+ } catch (e) {
+ e();
+ return fnGlobalObject()._12_14_14_foo === "test";
+ }
+ finally {
+ delete fnGlobalObject()._12_14_14_foo;
+ }
+ },
+
+ precondition: function prereq() {
+ return true;
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-15.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-15.js
new file mode 100644
index 000000000..3020bf43d
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-15.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "12.14-15",
+
+ path: "TestCases/chapter12/12.14/12.14-15.js",
+
+ description: "Exception object is a function which is a property of an object, when an exception parameter is called as a function in catch block, global object is passed as the this value",
+
+ test: function testcase() {
+ var obj = {};
+ obj.test = function () {
+ this._12_14_15_foo = "test";
+ };
+ try {
+ throw obj.test;
+ return false;
+ } catch (e) {
+ e();
+ return fnGlobalObject()._12_14_15_foo === "test";
+ }
+ finally {
+ delete fnGlobalObject()._12_14_15_foo;
+ }
+ },
+
+ precondition: function prereq() {
+ return true;
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-16.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-16.js
new file mode 100644
index 000000000..87f505382
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-16.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "12.14-16",
+
+ path: "TestCases/chapter12/12.14/12.14-16.js",
+
+ description: "Exception object is a function which update in catch block, when an exception parameter is called as a function in catch block, global object is passed as the this value",
+
+ test: function testcase() {
+ try {
+ throw function () {
+ this._12_14_16_foo = "test";
+ };
+ return false;
+ } catch (e) {
+ var obj = {};
+ obj.test = function () {
+ this._12_14_16_foo = "test1";
+ };
+ e = obj.test;
+ e();
+ return fnGlobalObject()._12_14_16_foo === "test1";
+ }
+ finally {
+ delete fnGlobalObject()._12_14_16_foo;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return true;
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-2.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-2.js
new file mode 100644
index 000000000..b72d4506a
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "12.14-2",
+
+path: "TestCases/chapter12/12.14/12.14-2.js",
+
+description: "catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter",
+
+test: function testcase() {
+ function capturedFoo() {return foo};
+ foo = "prior to throw";
+ try {
+ throw new Error();
+ }
+ catch (foo) {
+ var foo = "initializer in catch";
+ return capturedFoo() !== "initializer in catch";
+ }
+
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-3.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-3.js
new file mode 100644
index 000000000..0df1b6b5e
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-3",
+
+path: "TestCases/chapter12/12.14/12.14-3.js",
+
+description: "catch doesn't change declaration scope - var declaration are visible outside when name different from catch parameter",
+
+test: function testcase() {
+ try {
+ throw new Error();
+ }
+ catch (e) {
+ var foo = "declaration in catch";
+ }
+
+ return foo === "declaration in catch";
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-4.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-4.js
new file mode 100644
index 000000000..4a11d3912
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-4.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-4",
+
+path: "TestCases/chapter12/12.14/12.14-4.js",
+
+description: "catch introduces scope - block-local vars must shadow outer vars",
+
+test: function testcase() {
+ var o = { foo : 42};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ var foo;
+
+ if (foo === undefined) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-5.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-5.js
new file mode 100644
index 000000000..da1cc3e0b
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-5",
+
+path: "TestCases/chapter12/12.14/12.14-5.js",
+
+description: "catch introduces scope - block-local functions must shadow outer functions",
+
+test: function testcase() {
+ var o = {foo: function () { return 42;}};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ function foo() {}
+ if (foo() === undefined) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-6.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-6.js
new file mode 100644
index 000000000..92e6dbdc5
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-6",
+
+path: "TestCases/chapter12/12.14/12.14-6.js",
+
+description: "catch introduces scope - block-local function expression must shadow outer function expression",
+
+test: function testcase() {
+ var o = {foo : function () { return 42;}};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ var foo = function () {};
+ if (foo() === undefined) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-7.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-7.js
new file mode 100644
index 000000000..d8da127c9
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-7.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-7",
+
+path: "TestCases/chapter12/12.14/12.14-7.js",
+
+description: "catch introduces scope - scope removed when exiting catch block",
+
+test: function testcase() {
+ var o = {foo: 1};
+ var catchAccessed = false;
+
+ try {
+ throw o;
+ }
+ catch (expObj) {
+ catchAccessed = (expObj.foo == 1);
+ }
+
+ try {
+ expObj;
+ }
+ catch (e) {
+ return catchAccessed && e instanceof ReferenceError
+ }
+ return false;
+ },
+ precondition: function prereq() {
+ return true;
+ }
+
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-8.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-8.js
new file mode 100644
index 000000000..81ad12fb9
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-8.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-8",
+
+path: "TestCases/chapter12/12.14/12.14-8.js",
+
+description: "catch introduces scope - scope removed when exiting catch block (properties)",
+
+test: function testcase() {
+ var o = {foo: 42};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ var foo = 1;
+ }
+
+ if (o.foo === 42) {
+ return true;
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-9.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-9.js
new file mode 100644
index 000000000..4f0aacc84
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-9",
+
+path: "TestCases/chapter12/12.14/12.14-9.js",
+
+description: "catch introduces scope - name lookup finds outer variable",
+
+test: function testcase() {
+ function f(o) {
+ var x = 42;
+
+ function innerf(o) {
+ try {
+ throw o;
+ }
+ catch (e) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1-s.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1-s.js
new file mode 100644
index 000000000..64cac0ce1
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1-s.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "12.14.1-1-s",
+
+ path: "TestCases/chapter12/12.14/12.14.1/12.14.1-1-s.js",
+
+ description: "Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval",
+
+ test: function testcase() {
+ "use strict";
+
+ try {
+ eval("\
+ try {} catch (eval) { }\
+ ");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ },
+
+ strict: 1,
+
+ precondition: function prereq() {
+ return fnSupportsStrict();
+ }
+}); \ No newline at end of file
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1gs.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1gs.js
new file mode 100644
index 000000000..9ac0db6c1
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-1gs.js
@@ -0,0 +1,3 @@
+"use strict";
+throw NotEarlyError;
+try { } catch (eval) { } \ No newline at end of file
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-2-s.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-2-s.js
new file mode 100644
index 000000000..89226a807
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-2-s.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "12.14.1-2-s",
+
+ path: "TestCases/chapter12/12.14/12.14.1/12.14.1-2-s.js",
+
+ description: "Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is arguments",
+
+ test: function testcase() {
+ "use strict";
+
+ try {
+ eval("\
+ try {} catch (arguments) { }\
+ ");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError;
+ }
+ },
+
+ strict: 1,
+
+ precondition: function prereq() {
+ return fnSupportsStrict();
+ }
+}); \ No newline at end of file
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-3-s.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-3-s.js
new file mode 100644
index 000000000..39dbb88ca
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-3-s.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "12.14.1-3-s",
+
+ path: "TestCases/chapter12/12.14/12.14.1/12.14.1-3-s.js",
+
+ description: "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL but throws SyntaxError if it is eval",
+
+ test: function testcase() {
+ "use strict";
+
+ try{ eval(" try { \
+ throw new Error(\"...\");\
+ return false;\
+ } catch (EVAL) {\
+ try\
+ {\
+ throw new Error(\"...\");\
+ }catch(eval)\
+ {\
+ return EVAL instanceof Error;\
+ }\
+ }");
+ return false;
+ } catch(e) {
+ return e instanceof SyntaxError;
+ }
+ },
+
+ strict: 1,
+
+ precondition: function prereq() {
+ return fnSupportsStrict();
+ }
+});
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-4-s.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-4-s.js
new file mode 100644
index 000000000..eb3ca3b53
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-4-s.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "12.14.1-4-s",
+
+ path: "TestCases/chapter12/12.14/12.14.1/12.14.1-4-s.js",
+
+ description: "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL",
+
+ test: function testcase() {
+ "use strict";
+
+ try {
+ throw new Error("...");
+ return false;
+ } catch (EVAL) {
+ return EVAL instanceof Error;
+ }
+ },
+
+ strict: 1,
+
+ precondition: function prereq() {
+ return true;
+ }
+}); \ No newline at end of file
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-5-s.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-5-s.js
new file mode 100644
index 000000000..e7820de9f
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-5-s.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "12.14.1-5-s",
+
+ path: "TestCases/chapter12/12.14/12.14.1/12.14.1-5-s.js",
+
+ description: "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is Arguments",
+
+ test: function testcase() {
+ "use strict";
+
+ try {
+ throw new Error("...");
+ return false;
+ } catch (Arguments) {
+ return Arguments instanceof Error;
+ }
+ },
+
+ strict: 1,
+
+ precondition: function prereq() {
+ return true;
+ }
+}); \ No newline at end of file
diff --git a/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-6-s.js b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-6-s.js
new file mode 100644
index 000000000..bf3e5039f
--- /dev/null
+++ b/external/contributions/Microsoft/ietc_262modified/chapter12/12.14/12.14.1/12.14.1-6-s.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "12.14.1-6-s",
+
+ path: "TestCases/chapter12/12.14/12.14.1/12.14.1-6-s.js",
+
+ description: "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is ARGUMENTS",
+
+ test: function testcase() {
+ "use strict";
+
+ try {
+ throw new Error("...");
+ return false;
+ } catch (ARGUMENTS) {
+ return ARGUMENTS instanceof Error;
+ }
+ },
+
+ strict: 1,
+
+ precondition: function prereq() {
+ return true;
+ }
+}); \ No newline at end of file