diff options
author | David Fugate <dfugate@microsoft.com> | 2011-03-09 12:00:57 -0800 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2011-03-09 12:00:57 -0800 |
commit | 0eb3f27bf9ef049aa6694369d7873213871fe181 (patch) | |
tree | 697c05347df2157aaaf1226ac811910df24dbab5 /test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5 | |
parent | 2e0481cc8c01f2af37a42ba7aff5b8c4a3563eb6 (diff) | |
download | test262-0eb3f27bf9ef049aa6694369d7873213871fe181.tar.gz |
Added IE Test Center test case contributions to test/suite/ietestcenter.
Diffstat (limited to 'test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5')
314 files changed, 15605 insertions, 0 deletions
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js new file mode 100644 index 000000000..52c9cd36b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js @@ -0,0 +1,34 @@ +/// 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: "15.2.3.5-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js",
+
+description: "Object.create must exist as a function",
+
+test: function testcase() {
+ if (typeof(Object.create) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js new file mode 100644 index 000000000..7290efa5e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js @@ -0,0 +1,38 @@ +/// 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: "15.2.3.5-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js",
+
+description: "Object.create must exist as a function taking 2 parameters",
+
+test: function testcase() {
+ if (Object.create.length === 2) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js new file mode 100644 index 000000000..f9762bafd --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.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: "15.2.3.5-1-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js",
+
+ description: "Object.create throws TypeError if 'O' is undefined",
+
+ test: function testcase() {
+
+ try {
+ Object.create(undefined);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js new file mode 100644 index 000000000..d16e12056 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.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: "15.2.3.5-1-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js",
+
+ description: "Object.create TypeError is not thrown if 'O' is null",
+
+ test: function testcase() {
+ try {
+ Object.create(null);
+ return true;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js new file mode 100644 index 000000000..8a3ff7340 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.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: "15.2.3.5-1-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js",
+
+ description: "Object.create throws TypeError if 'O' is a boolean primitive",
+
+ test: function testcase() {
+
+ try {
+ Object.create(true);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js new file mode 100644 index 000000000..a05069527 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.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: "15.2.3.5-1-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js",
+
+ description: "Object.create throws TypeError if 'O' is a number primitive",
+
+ test: function testcase() {
+
+ try {
+ Object.create(2);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js new file mode 100644 index 000000000..0064f2d35 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js @@ -0,0 +1,43 @@ +/// 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: "15.2.3.5-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js",
+
+description: "Object.create throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.create(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js new file mode 100644 index 000000000..9322aa829 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.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.
+
+/*
+create sets the [[Prototype]] of the created object to first parameter.
+This can be checked using isPrototypeOf, or getPrototypeOf.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js",
+
+description: "Object.create creates new Object",
+
+test: function testcase() {
+ function base() {}
+ var b = new base();
+ var prop = new Object();
+ var d = Object.create(b);
+
+ if (typeof d === 'object') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js new file mode 100644 index 000000000..39b6b28a3 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js @@ -0,0 +1,38 @@ +/// 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: "15.2.3.5-2-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js",
+
+ description: "Object.create - returned object is an instance of Object",
+
+ test: function testcase() {
+
+ var newObj = Object.create({});
+ return newObj instanceof Object;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js new file mode 100644 index 000000000..120200ec4 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.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.
+
+/*
+create sets the [[Prototype]] of the created object to first parameter.
+This can be checked using isPrototypeOf, or getPrototypeOf.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-3-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js",
+
+description: "Object.create sets the prototype of the passed-in object",
+
+test: function testcase() {
+ function base() {}
+ var b = new base();
+ var d = Object.create(b);
+
+ if (Object.getPrototypeOf(d) === b &&
+ b.isPrototypeOf(d) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js new file mode 100644 index 000000000..58820f656 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.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.
+
+/*
+create sets the [[Prototype]] of the created object to first parameter.
+This can be checked using isPrototypeOf, or getPrototypeOf.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-4-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js",
+
+description: "Object.create sets the prototype of the passed-in object and adds new properties",
+
+test: function testcase() {
+ function base() {}
+ var b = new base();
+ var prop = new Object();
+ var d = Object.create(b,{ "x": {value: true,writable: false},
+ "y": {value: "str",writable: false} });
+
+ if (Object.getPrototypeOf(d) === b &&
+ b.isPrototypeOf(d) === true &&
+ d.x === true &&
+ d.y === "str" &&
+ b.x === undefined &&
+ b.y === undefined) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js new file mode 100644 index 000000000..e039d31da --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js",
+
+ description: "Object.create - argument 'Properties' is the Math object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var result = false;
+ Object.defineProperty(Math, "prop", {
+ get: function () {
+ result = (this === Math);
+ return {};
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ var newObj = Object.create({}, Math);
+ return result && newObj.hasOwnProperty("prop");
+ } finally {
+ delete Math.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js new file mode 100644 index 000000000..7104f51b9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.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: "15.2.3.5-4-100",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is not present (8.10.5 step 4)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ value: "ownDataProperty"
+ }
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js new file mode 100644 index 000000000..78d46a65f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.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: "15.2.3.5-4-101",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: false
+ }
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js new file mode 100644 index 000000000..724c7696a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.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: "15.2.3.5-4-102",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an inherited data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ configurable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js new file mode 100644 index 000000000..691a08e31 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js @@ -0,0 +1,56 @@ +/// 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: "15.2.3.5-4-103",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ configurable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "configurable", {
+ value: false
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js new file mode 100644 index 000000000..8e381f02e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.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: "15.2.3.5-4-104",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "configurable", {
+ value: false
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js new file mode 100644 index 000000000..b2d3ff714 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-105",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = {};
+ Object.defineProperty(descObj, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js new file mode 100644 index 000000000..0138b8d66 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js @@ -0,0 +1,56 @@ +/// 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: "15.2.3.5-4-106",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js new file mode 100644 index 000000000..aa80dff13 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-107",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ configurable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "configurable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js new file mode 100644 index 000000000..40580af6c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js @@ -0,0 +1,61 @@ +/// 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: "15.2.3.5-4-108",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "configurable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js new file mode 100644 index 000000000..5edf23316 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.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: "15.2.3.5-4-109",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = {};
+ Object.defineProperty(descObj, "configurable", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js new file mode 100644 index 000000000..9eec60029 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.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: "15.2.3.5-4-11",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js",
+
+ description: "Object.create - argument 'Properties' is a Date object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var props = new Date();
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Date;
+ return {};
+ },
+ enumerable: true
+ });
+ var newObj = Object.create({}, props);
+ return result && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js new file mode 100644 index 000000000..0ff2ce92a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.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: "15.2.3.5-4-110",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "configurable", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js new file mode 100644 index 000000000..8f34fb83b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.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: "15.2.3.5-4-111",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "configurable", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js new file mode 100644 index 000000000..ae0ca525d --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.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: "15.2.3.5-4-112",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js",
+
+ description: "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = function () { };
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js new file mode 100644 index 000000000..9bebba1dd --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.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: "15.2.3.5-4-113",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js",
+
+ description: "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = [];
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js new file mode 100644 index 000000000..11e2a90ff --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.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: "15.2.3.5-4-114",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js",
+
+ description: "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = new String();
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js new file mode 100644 index 000000000..08d50b6bf --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.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: "15.2.3.5-4-115",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js",
+
+ description: "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = new Boolean(false);
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js new file mode 100644 index 000000000..f401ab118 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.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: "15.2.3.5-4-116",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js",
+
+ description: "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = new Number(-9);
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js new file mode 100644 index 000000000..b363d2945 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-117",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js",
+
+ description: "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ try {
+ Math.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: Math
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ } finally {
+ delete Math.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js new file mode 100644 index 000000000..8b186d57b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.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: "15.2.3.5-4-118",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = new Date();
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js new file mode 100644 index 000000000..535a0ed18 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.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: "15.2.3.5-4-119",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = new RegExp();
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js new file mode 100644 index 000000000..9e6bbea3a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-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: "15.2.3.5-4-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js",
+
+ description: "Object.create - argument 'Properties' is a RegExp object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var props = new RegExp();
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof RegExp;
+ return {};
+ },
+ enumerable: true
+ });
+ var newObj = Object.create({}, props);
+ return result && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js new file mode 100644 index 000000000..ecd606122 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-120",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js",
+
+ description: "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ try {
+ JSON.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: JSON
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ } finally {
+ delete JSON.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js new file mode 100644 index 000000000..0a8a7b96c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.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: "15.2.3.5-4-121",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js",
+
+ description: "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var descObj = new Error();
+
+ descObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js new file mode 100644 index 000000000..037e51d93 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.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: "15.2.3.5-4-122",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js",
+
+ description: "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: argObj
+ });
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js new file mode 100644 index 000000000..a6f9f4527 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-124",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js",
+
+ description: "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+
+ try {
+ fnGlobalObject().configurable = true;
+
+ var newObj = Object.create({}, {
+ prop: fnGlobalObject()
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ } finally {
+ delete fnGlobalObject().configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js new file mode 100644 index 000000000..08b761019 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.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: "15.2.3.5-4-125",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is undefined (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: undefined
+ }
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js new file mode 100644 index 000000000..5ba1ded89 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.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: "15.2.3.5-4-126",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is null (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: null
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js new file mode 100644 index 000000000..ad1a711e0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.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: "15.2.3.5-4-127",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is true (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: true
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js new file mode 100644 index 000000000..6212b57d7 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.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: "15.2.3.5-4-128",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is false (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: false
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js new file mode 100644 index 000000000..01ad4515c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.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: "15.2.3.5-4-129",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is 0 (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: 0
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js new file mode 100644 index 000000000..83d42a995 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.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: "15.2.3.5-4-13",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js",
+
+ description: "Object.create - argument 'Properties' is the JSON object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var result = false;
+
+ Object.defineProperty(JSON, "prop", {
+ get: function () {
+ result = (this === JSON);
+ return {};
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ var newObj = Object.create({}, JSON);
+ return result && newObj.hasOwnProperty("prop");
+ } finally {
+ delete JSON.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js new file mode 100644 index 000000000..ee08f5b34 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.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: "15.2.3.5-4-130",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is +0 (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: +0
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js new file mode 100644 index 000000000..32c87a5e5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.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: "15.2.3.5-4-131",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is -0 (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: -0
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js new file mode 100644 index 000000000..02027baa1 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.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: "15.2.3.5-4-132",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is NaN (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: NaN
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js new file mode 100644 index 000000000..aac60fa10 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.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: "15.2.3.5-4-133",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a positive number (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: 123
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js new file mode 100644 index 000000000..2ca8b4ce0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.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: "15.2.3.5-4-134",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a negative number (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: -123
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js new file mode 100644 index 000000000..5fdce5b55 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.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: "15.2.3.5-4-135",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an empty string (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: ""
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js new file mode 100644 index 000000000..75d5d0876 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.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: "15.2.3.5-4-136",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a non-empty string (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: "abc"
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js new file mode 100644 index 000000000..335499304 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.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: "15.2.3.5-4-137",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a Function object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: function () { }
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js new file mode 100644 index 000000000..c96b17d84 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.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: "15.2.3.5-4-138",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an Array object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: []
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js new file mode 100644 index 000000000..e245964b5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.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: "15.2.3.5-4-139",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a String object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new String("abc")
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js new file mode 100644 index 000000000..bc0a85c22 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-14",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js",
+
+ description: "Object.create - argument 'Properties' is an Error object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var props = new Error("test");
+ var result = false;
+
+ (Object.getOwnPropertyNames(props)).forEach(function(name){
+ props[name] = {value:11, configurable:true}
+ });
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Error;
+ return {};
+ },
+ enumerable: true
+ });
+ var newObj = Object.create({}, props);
+ return result && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Array.prototype.forEach) && fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js new file mode 100644 index 000000000..0d30c5bcc --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.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: "15.2.3.5-4-140",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a Boolean object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new Boolean(true)
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js new file mode 100644 index 000000000..a04caa4cc --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.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: "15.2.3.5-4-141",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a Number object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new Number(123)
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js new file mode 100644 index 000000000..705e848d3 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.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: "15.2.3.5-4-142",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is the Math object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: Math
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js new file mode 100644 index 000000000..54befd6f0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.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: "15.2.3.5-4-143",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a Date object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new Date()
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js new file mode 100644 index 000000000..5a5d4f05d --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.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: "15.2.3.5-4-144",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a RegExp object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new RegExp()
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js new file mode 100644 index 000000000..500b66df0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.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: "15.2.3.5-4-145",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is the JSON object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: JSON
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js new file mode 100644 index 000000000..8165d108f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.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: "15.2.3.5-4-146",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an Error object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new Error()
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js new file mode 100644 index 000000000..27fe67f03 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-147",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is an Arguments object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: argObj
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js new file mode 100644 index 000000000..4753b0185 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.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: "15.2.3.5-4-149",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is the global object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: fnGlobalObject()
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js new file mode 100644 index 000000000..aa13266fa --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.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: "15.2.3.5-4-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js",
+
+ description: "Object.create - argument 'Properties' is the Aguments object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var result = false;
+
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(argObj, "prop", {
+ get: function () {
+ result = ('[object Arguments]' === Object.prototype.toString.call(this));
+ return {};
+ },
+ enumerable: true
+ });
+
+ var newObj = Object.create({}, argObj);
+ return result && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js new file mode 100644 index 000000000..e493ace73 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.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: "15.2.3.5-4-150",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is a string (value is 'false') which is treated as the value true (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: "false"
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js new file mode 100644 index 000000000..94e3c11d2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.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: "15.2.3.5-4-151",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is new Boolean(false) which is treated as the value true (8.10.5 step 4.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: new Boolean(false)
+ }
+ });
+
+ var beforeDeleted = newObj.hasOwnProperty("prop");
+
+ delete newObj.prop;
+
+ var afterDeleted = newObj.hasOwnProperty("prop");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js new file mode 100644 index 000000000..2135e62f2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js @@ -0,0 +1,43 @@ +/// 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: "15.2.3.5-4-152",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is present (8.10.5 step 5)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ value: 100
+ }
+ });
+
+ return newObj.prop === 100;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js new file mode 100644 index 000000000..476a68435 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.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: "15.2.3.5-4-153",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is not present (8.10.5 step 5)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {}
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js new file mode 100644 index 000000000..147fed6da --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js @@ -0,0 +1,43 @@ +/// 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: "15.2.3.5-4-154",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ value: "ownDataProperty"
+ }
+ });
+
+ return newObj.prop === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js new file mode 100644 index 000000000..f066ca65a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.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: "15.2.3.5-4-155",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is an inherited data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ value: "inheritedDataProperty"
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "inheritedDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js new file mode 100644 index 000000000..3f1db645e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-156",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ value: "inheritedDataProperty"
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ descObj.value = "ownDataProperty";
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js new file mode 100644 index 000000000..6128b1478 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js @@ -0,0 +1,60 @@ +/// 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: "15.2.3.5-4-157",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "value", {
+ get: function () {
+ return "ownDataProperty";
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js new file mode 100644 index 000000000..c9feb4634 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.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: "15.2.3.5-4-158",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var descObj = {};
+
+ Object.defineProperty(descObj, "value", {
+ get: function () {
+ return "ownAccessorProperty";
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js new file mode 100644 index 000000000..aa4ccc065 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.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: "15.2.3.5-4-159",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "inheritedAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js new file mode 100644 index 000000000..137411018 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js @@ -0,0 +1,40 @@ +/// 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: "15.2.3.5-4-16",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js",
+
+ description: "Object.create - own enumerable data property in 'Properties' is defined in 'obj' (15.2.3.7 step 3)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {}
+ });
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js new file mode 100644 index 000000000..47ba1782d --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js @@ -0,0 +1,56 @@ +/// 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: "15.2.3.5-4-160",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ value: "inheritedDataProperty"
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "value", {
+ get: function () {
+ return "ownAccessorProperty";
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js new file mode 100644 index 000000000..fb944649e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js @@ -0,0 +1,60 @@ +/// 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: "15.2.3.5-4-161",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "value", {
+ get: function () {
+ return "ownAccessorProperty";
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js new file mode 100644 index 000000000..bdfc30197 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.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: "15.2.3.5-4-162",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var descObj = {};
+
+ Object.defineProperty(descObj, "value", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js new file mode 100644 index 000000000..56d4b06d5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-163",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "value", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js new file mode 100644 index 000000000..0d586ea60 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-164",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js",
+
+ description: "Object.create - 'value' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "value", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js new file mode 100644 index 000000000..3a7f5bc67 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.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: "15.2.3.5-4-165",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js",
+
+ description: "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var Func = function (a, b) {
+ return a + b;
+ };
+
+ var fun = new Func();
+ fun.value = "FunValue";
+
+ var newObj = Object.create({}, {
+ prop: fun
+ });
+ return newObj.prop === "FunValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js new file mode 100644 index 000000000..1a20caf87 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-166",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js",
+
+ description: "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var arr = [1, 2, 3];
+
+ arr.value = "ArrValue";
+
+ var newObj = Object.create({}, {
+ prop: arr
+ });
+
+ return newObj.prop === "ArrValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js new file mode 100644 index 000000000..21936355b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-167",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js",
+
+ description: "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var str = new String("abc");
+
+ str.value = "StrValue";
+
+ var newObj = Object.create({}, {
+ prop: str
+ });
+
+ return newObj.prop === "StrValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js new file mode 100644 index 000000000..e8a53c4ee --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-168",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js",
+
+ description: "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var booleanObj = new Boolean(false);
+
+ booleanObj.value = "BooleanValue";
+
+ var newObj = Object.create({}, {
+ prop: booleanObj
+ });
+
+ return newObj.prop === "BooleanValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js new file mode 100644 index 000000000..574217c52 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-169",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js",
+
+ description: "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var numObj = new Number(123);
+
+ numObj.value = "NumValue";
+
+ var newObj = Object.create({}, {
+ prop: numObj
+ });
+
+ return newObj.prop === "NumValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js new file mode 100644 index 000000000..f38057c6b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.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: "15.2.3.5-4-17",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js",
+
+ description: "Object.create - own data property in 'Properties' which is not enumerable is not defined in 'obj' (15.2.3.7 step 3)",
+
+ test: function testcase() {
+
+ var props = {};
+ Object.defineProperty(props, "prop", {
+ value: {},
+ enumerable: false
+ });
+ var newObj = Object.create({}, props);
+
+ return !newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js new file mode 100644 index 000000000..9997529df --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.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: "15.2.3.5-4-170",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js",
+
+ description: "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ try {
+ Math.value = "MathValue";
+
+ var newObj = Object.create({}, {
+ prop: Math
+ });
+
+ return newObj.prop === "MathValue";
+ } finally {
+ delete Math.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js new file mode 100644 index 000000000..301158c24 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-171",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var dateObj = new Date();
+
+ dateObj.value = "DateValue";
+
+ var newObj = Object.create({}, {
+ prop: dateObj
+ });
+
+ return newObj.prop === "DateValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js new file mode 100644 index 000000000..b2b18dbe0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-172",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js",
+
+ description: "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var regObj = new RegExp();
+
+ regObj.value = "RegExpValue";
+
+ var newObj = Object.create({}, {
+ prop: regObj
+ });
+
+ return newObj.prop === "RegExpValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js new file mode 100644 index 000000000..96afce390 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.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: "15.2.3.5-4-173",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js",
+
+ description: "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ try {
+ JSON.value = "JSONValue";
+
+ var newObj = Object.create({}, {
+ prop: JSON
+ });
+
+ return newObj.prop === "JSONValue";
+ } finally {
+ delete JSON.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js new file mode 100644 index 000000000..df2d0ccce --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-174",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js",
+
+ description: "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var errorObj = new Error();
+
+ errorObj.value = "ErrorValue";
+
+ var newObj = Object.create({}, {
+ prop: errorObj
+ });
+
+ return newObj.prop === "ErrorValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js new file mode 100644 index 000000000..e2dd27913 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-175",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js",
+
+ description: "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.value = "ArgValue";
+
+ var newObj = Object.create({}, {
+ prop: argObj
+ });
+
+ return newObj.prop === "ArgValue";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js new file mode 100644 index 000000000..8ba7cfe4e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.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: "15.2.3.5-4-177",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js",
+
+ description: "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+
+ try {
+ fnGlobalObject().value = "GlobalValue";
+
+ var newObj = Object.create({}, {
+ prop: fnGlobalObject()
+ });
+
+ return newObj.prop === "GlobalValue";
+ } finally {
+ delete fnGlobalObject().value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js new file mode 100644 index 000000000..d70a5a6a9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.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: "15.2.3.5-4-178",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is true (8.10.5 step 6)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: true
+ }
+ });
+
+ var beforeWrite = ((newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined"));
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js new file mode 100644 index 000000000..0f42f1063 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.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: "15.2.3.5-4-179",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is not present (8.10.5 step 6)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ value: 100
+ }
+ });
+
+ var beforeWrite = (newObj.prop === 100);
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === 100);
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js new file mode 100644 index 000000000..c88421f2d --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.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: "15.2.3.5-4-18",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js",
+
+ description: "Object.create - an enumerable inherited data property in 'Properties' is not defined in 'obj' (15.2.3.7 step 3)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ proto.prop = {};
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+
+ var newObj = Object.create({}, child);
+
+ return !newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js new file mode 100644 index 000000000..2397280ef --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.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: "15.2.3.5-4-180",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: true
+ }
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js new file mode 100644 index 000000000..514401cc9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js @@ -0,0 +1,56 @@ +/// 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: "15.2.3.5-4-181",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an inherited data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ writable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js new file mode 100644 index 000000000..209281c85 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-182",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ writable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ descObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js new file mode 100644 index 000000000..82689a24c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js @@ -0,0 +1,64 @@ +/// 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: "15.2.3.5-4-183",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "writable", {
+ value: true
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js new file mode 100644 index 000000000..06d2df08a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js @@ -0,0 +1,55 @@ +/// 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: "15.2.3.5-4-184",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var descObj = {};
+
+ Object.defineProperty(descObj, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js new file mode 100644 index 000000000..e3f56e542 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js @@ -0,0 +1,60 @@ +/// 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: "15.2.3.5-4-185",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js new file mode 100644 index 000000000..8a6196663 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-186",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ writable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js new file mode 100644 index 000000000..9f2d2d904 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js @@ -0,0 +1,66 @@ +/// 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: "15.2.3.5-4-187",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js new file mode 100644 index 000000000..1a36de596 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.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: "15.2.3.5-4-188",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var descObj = { value: 100 };
+
+ Object.defineProperty(descObj, "writable", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.prop === 100);
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === 100);
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js new file mode 100644 index 000000000..2f5b971f4 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js @@ -0,0 +1,64 @@ +/// 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: "15.2.3.5-4-189",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "writable", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js new file mode 100644 index 000000000..274191c88 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.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: "15.2.3.5-4-19",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js",
+
+ description: "Object.create - own enumerable accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 3)",
+
+ test: function testcase() {
+
+ var props = {};
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ return {};
+ },
+ enumerable: true
+ });
+
+ var newObj = Object.create({}, props);
+
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js new file mode 100644 index 000000000..1a0063408 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-190",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var proto = { value: 100 };
+
+ Object.defineProperty(proto, "writable", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var beforeWrite = (newObj.prop === 100);
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === 100);
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js new file mode 100644 index 000000000..16b21e2c9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.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: "15.2.3.5-4-191",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js",
+
+ description: "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var Func = function (a, b) {
+ return a + b;
+ };
+
+ var fun = new Func();
+ fun.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: fun
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js new file mode 100644 index 000000000..e4ca075c6 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-192",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js",
+
+ description: "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var array = [1, 2, 3];
+
+ array.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: array
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js new file mode 100644 index 000000000..13487414a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-193",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js",
+
+ description: "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var str = new String("abc");
+
+ str.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: str
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js new file mode 100644 index 000000000..f9a165150 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-194",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js",
+
+ description: "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var booleanObj = new Boolean(false);
+
+ booleanObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: booleanObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js new file mode 100644 index 000000000..d696dee1d --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-195",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js",
+
+ description: "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var numObj = new Number(123);
+
+ numObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: numObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js new file mode 100644 index 000000000..f33c5da43 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.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: "15.2.3.5-4-196",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js",
+
+ description: "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ try {
+ Math.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: Math
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Math.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js new file mode 100644 index 000000000..89ec94525 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-197",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var dateObj = new Date();
+
+ dateObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: dateObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js new file mode 100644 index 000000000..c986d7587 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-198",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js",
+
+ description: "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var regObj = new RegExp();
+
+ regObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: regObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js new file mode 100644 index 000000000..0cc8853f8 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.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: "15.2.3.5-4-199",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js",
+
+ description: "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ try {
+ JSON.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: JSON
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete JSON.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js new file mode 100644 index 000000000..3a9c09011 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js @@ -0,0 +1,38 @@ +/// 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: "15.2.3.5-4-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js",
+
+ description: "Object.create - 'Properties' is undefined",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, undefined);
+ return (newObj instanceof Object);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js new file mode 100644 index 000000000..fd9054f1a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.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: "15.2.3.5-4-20",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js",
+
+ description: "Object.create - own accessor property in 'Properties' which is not enumerable is not defined in 'obj' (15.2.3.7 step 3)",
+
+ test: function testcase() {
+
+ var props = {};
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ return {};
+ },
+ enumerable: false
+ });
+
+ var newObj = Object.create({}, props);
+
+ return !newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js new file mode 100644 index 000000000..a9961666a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-200",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js",
+
+ description: "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var errorObj = new Error();
+
+ errorObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: errorObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js new file mode 100644 index 000000000..635bbcd74 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-201",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js",
+
+ description: "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.writable = true;
+
+ var newObj = Object.create({}, {
+ prop: argObj
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js new file mode 100644 index 000000000..ef4d75810 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.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: "15.2.3.5-4-203",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js",
+
+ description: "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+
+ try {
+ fnGlobalObject().writable = true;
+
+ var newObj = Object.create({}, {
+ prop: fnGlobalObject()
+ });
+
+ var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
+
+ newObj.prop = "isWritable";
+
+ var afterWrite = (newObj.prop === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete fnGlobalObject().writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js new file mode 100644 index 000000000..4d1650347 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.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: "15.2.3.5-4-204",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is undefined (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ writable: undefined
+ }
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js new file mode 100644 index 000000000..af3c2a0f8 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.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: "15.2.3.5-4-205",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is null (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: null
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js new file mode 100644 index 000000000..ffdeec539 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.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: "15.2.3.5-4-206",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is true (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: true
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js new file mode 100644 index 000000000..c97c71775 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.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: "15.2.3.5-4-207",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is false (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: false
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js new file mode 100644 index 000000000..d1e82ea41 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.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: "15.2.3.5-4-208",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is 0 (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: 0
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js new file mode 100644 index 000000000..b91f74417 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.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: "15.2.3.5-4-209",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is +0 (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: +0
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js new file mode 100644 index 000000000..bb081d982 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-21",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js",
+
+ description: "Object.create - an enumerable inherited accessor property in 'Properties' is not defined in 'obj' (15.2.3.7 step 3)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "prop", {
+ get: function () {
+ return {};
+ },
+ enumerable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+
+ var newObj = Object.create({}, child);
+
+ return !newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js new file mode 100644 index 000000000..dffa42320 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.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: "15.2.3.5-4-210",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is -0 (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: -0
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js new file mode 100644 index 000000000..b916530aa --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.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: "15.2.3.5-4-211",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is NaN (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: NaN
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js new file mode 100644 index 000000000..9a92b1623 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.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: "15.2.3.5-4-212",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a positive number primitive (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: 12
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js new file mode 100644 index 000000000..8e3f6c1bb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.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: "15.2.3.5-4-213",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a negative number primitive (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: -9
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js new file mode 100644 index 000000000..abc2cfda1 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.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: "15.2.3.5-4-214",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an empty string (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var descObj = {
+ writable: ""
+ };
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ var hasProperty = newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+
+ newObj.prop = 121;
+
+ return hasProperty && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js new file mode 100644 index 000000000..c29c881bf --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.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: "15.2.3.5-4-215",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a non-empty string (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: "abc"
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js new file mode 100644 index 000000000..4518e50fb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.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: "15.2.3.5-4-216",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a Function object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: function () { }
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js new file mode 100644 index 000000000..ea6570fcf --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.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: "15.2.3.5-4-217",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an Array object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: []
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js new file mode 100644 index 000000000..80904c24c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.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: "15.2.3.5-4-218",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a String object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new String()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js new file mode 100644 index 000000000..f4617e53c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.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: "15.2.3.5-4-219",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a Boolean object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new Boolean()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js new file mode 100644 index 000000000..085283736 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-22",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js",
+
+ description: "Object.create - own enumerable data property that overrides an enumerable inherited data property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ proto.prop = {
+ value: "abc"
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.prop = {
+ value: "bbq"
+ };
+ var newObj = Object.create({}, child);
+
+ return newObj.hasOwnProperty("prop") && newObj.prop === "bbq";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js new file mode 100644 index 000000000..84e9a3d94 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.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: "15.2.3.5-4-220",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a Number object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new Number()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js new file mode 100644 index 000000000..5024190e7 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.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: "15.2.3.5-4-221",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is the Math object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: Math
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js new file mode 100644 index 000000000..28467c12e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.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: "15.2.3.5-4-222",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a Date object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new Date()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js new file mode 100644 index 000000000..2b298c7cd --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.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: "15.2.3.5-4-223",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a RegExp object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new RegExp()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js new file mode 100644 index 000000000..ae4ea094e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.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: "15.2.3.5-4-224",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is the JSON object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: JSON
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+ newObj.prop = 121;
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js new file mode 100644 index 000000000..cc0622298 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.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: "15.2.3.5-4-225",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an Error object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new Error()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+ newObj.prop = 121;
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js new file mode 100644 index 000000000..e4d381ceb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.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: "15.2.3.5-4-226",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is an Arguments object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: argObj
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js new file mode 100644 index 000000000..504ff2d7c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.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: "15.2.3.5-4-228",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is the global object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: fnGlobalObject()
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js new file mode 100644 index 000000000..c7cc62339 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.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: "15.2.3.5-4-229",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is a string (value is 'false') which is treated as the value true (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: "false"
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js new file mode 100644 index 000000000..042073c15 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js @@ -0,0 +1,57 @@ +/// 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: "15.2.3.5-4-23",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js",
+
+ description: "Object.create - own enumerable data property that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "prop", {
+ get: function () {
+ return { value: 9 };
+ },
+ enumerable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "prop", {
+ value: {
+ value: 12
+ },
+ enumerable: true
+ });
+ var newObj = Object.create({}, child);
+
+ return newObj.hasOwnProperty("prop") && newObj.prop === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js new file mode 100644 index 000000000..a814e0d9f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.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: "15.2.3.5-4-230",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js",
+
+ description: "Object.create - 'writable' property of one property in 'Properties' is new Boolean(false) which is treated as the value true (8.10.5 step 6.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ writable: new Boolean(false)
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 121;
+
+ return hasProperty && newObj.prop === 121;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js new file mode 100644 index 000000000..5fd79c898 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.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: "15.2.3.5-4-231",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is present (8.10.5 step 7)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ get: function () {
+ return "present";
+ }
+ }
+ });
+ return newObj.prop === "present";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js new file mode 100644 index 000000000..c3c4d2be8 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js @@ -0,0 +1,40 @@ +/// 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: "15.2.3.5-4-232",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is not present (8.10.5 step 7)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {}
+ });
+ return typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js new file mode 100644 index 000000000..d0f641278 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.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: "15.2.3.5-4-233",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ get: function () {
+ return "ownDataProperty";
+ }
+ }
+ });
+ return newObj.prop === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js new file mode 100644 index 000000000..233d47a0a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-234",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is an inherited data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ get: function () {
+ return "inheritedDataProperty";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "inheritedDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js new file mode 100644 index 000000000..4c91b5d76 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-235",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var proto = {
+ get: function () {
+ return "inheritedDataProperty";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "get", {
+ value: function () {
+ return "ownDataProperty";
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js new file mode 100644 index 000000000..f35677ae4 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js @@ -0,0 +1,61 @@ +/// 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: "15.2.3.5-4-236",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "get", {
+ value: function () {
+ return "ownDataProperty";
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js new file mode 100644 index 000000000..97b0fd7f8 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-237",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var descObj = {};
+
+ Object.defineProperty(descObj, "get", {
+ get: function () {
+ return function () {
+ return "ownAccessorProperty";
+ };
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js new file mode 100644 index 000000000..5df125d52 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js @@ -0,0 +1,55 @@ +/// 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: "15.2.3.5-4-238",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "inheritedAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js new file mode 100644 index 000000000..93ba74b4c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-239",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var proto = {
+ get: function () {
+ return "inheritedDataProperty";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "get", {
+ get: function () {
+ return function () {
+ return "ownAccessorProperty";
+ };
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js new file mode 100644 index 000000000..39e858d9a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js @@ -0,0 +1,57 @@ +/// 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: "15.2.3.5-4-24",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js",
+
+ description: "Object.create - own enumerable accessor property that overrides an enumerable inherited data property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ proto.prop = {
+ value: 12
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "prop", {
+ get: function () {
+ return {
+ value: 9
+ };
+ },
+ enumerable: true
+ });
+
+ var newObj = Object.create({}, child);
+
+ return newObj.hasOwnProperty("prop") && newObj.prop === 9;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js new file mode 100644 index 000000000..a7b08453f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-240",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var proto = {};
+
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "get", {
+ get: function () {
+ return function () {
+ return "ownAccessorProperty";
+ };
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.prop === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js new file mode 100644 index 000000000..ef317a213 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.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: "15.2.3.5-4-241",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var descObj = {};
+
+ Object.defineProperty(descObj, "get", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js new file mode 100644 index 000000000..99cbd9f20 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js @@ -0,0 +1,58 @@ +/// 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: "15.2.3.5-4-242",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var proto = {};
+
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "get", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js new file mode 100644 index 000000000..50281f993 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.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: "15.2.3.5-4-243",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var proto = {};
+
+ Object.defineProperty(proto, "get", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js new file mode 100644 index 000000000..f0eb24551 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.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: "15.2.3.5-4-244",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js",
+
+ description: "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var funObj = function () {};
+
+ funObj.get = function () {
+ return "VerifyFunctionObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: funObj
+ });
+
+ return newObj.prop === "VerifyFunctionObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js new file mode 100644 index 000000000..1841dd74b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.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: "15.2.3.5-4-245",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js",
+
+ description: "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var arrayObj = [1, 2, 3];
+
+ arrayObj.get = function () {
+ return "VerifyArrayObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: arrayObj
+ });
+
+ return newObj.prop === "VerifyArrayObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js new file mode 100644 index 000000000..703387d4e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.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: "15.2.3.5-4-246",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js",
+
+ description: "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var strObj = new String("abc");
+
+ strObj.get = function () {
+ return "VerifyStringObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: strObj
+ });
+
+ return newObj.prop === "VerifyStringObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js new file mode 100644 index 000000000..2d97684e0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.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: "15.2.3.5-4-247",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js",
+
+ description: "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var boolObj = new Boolean(true);
+
+ boolObj.get = function () {
+ return "VerifyBooleanObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: boolObj
+ });
+
+ return newObj.prop === "VerifyBooleanObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js new file mode 100644 index 000000000..cb0c2071b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.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: "15.2.3.5-4-248",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js",
+
+ description: "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var numObj = new Number(5);
+
+ numObj.get = function () {
+ return "VerifyNumberObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: numObj
+ });
+
+ return newObj.prop === "VerifyNumberObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js new file mode 100644 index 000000000..2ee93e436 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.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: "15.2.3.5-4-249",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var dateObj = new Date();
+
+ dateObj.get = function () {
+ return "VerifyDateObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: dateObj
+ });
+
+ return newObj.prop === "VerifyDateObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js new file mode 100644 index 000000000..58a15c36e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js @@ -0,0 +1,61 @@ +/// 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: "15.2.3.5-4-25",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js",
+
+ description: "Object.create - own enumerable accessor property that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) ",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "prop", {
+ get: function () {
+ return {
+ value: 9
+ };
+ },
+ enumerable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "prop", {
+ get: function () {
+ return {
+ value: 12
+ };
+ },
+ enumerable: true
+ });
+ var newObj = Object.create({}, child);
+
+ return newObj.hasOwnProperty("prop") && newObj.prop === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js new file mode 100644 index 000000000..7f55995e7 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.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: "15.2.3.5-4-250",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js",
+
+ description: "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var regObj = new RegExp();
+
+ regObj.get = function () {
+ return "VerifyRegExpObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: regObj
+ });
+
+ return newObj.prop === "VerifyRegExpObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js new file mode 100644 index 000000000..a00f44a21 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.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: "15.2.3.5-4-251",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js",
+
+ description: "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ try {
+ Math.get = function () {
+ return "VerifyMathObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: Math
+ });
+
+ return newObj.prop === "VerifyMathObject";
+ } finally {
+ delete Math.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js new file mode 100644 index 000000000..bc325006b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.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: "15.2.3.5-4-252",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js",
+
+ description: "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ JSON.get = function () {
+ return "VerifyJSONObject";
+ };
+
+ try {
+ var newObj = Object.create({}, {
+ prop: JSON
+ });
+
+ return newObj.prop === "VerifyJSONObject";
+ } finally {
+ delete JSON.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js new file mode 100644 index 000000000..81a72fd2c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.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: "15.2.3.5-4-253",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js",
+
+ description: "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var errObj = new Error("error");
+
+ errObj.get = function () {
+ return "VerifyErrorObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: errObj
+ });
+
+ return newObj.prop === "VerifyErrorObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js new file mode 100644 index 000000000..858281041 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.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: "15.2.3.5-4-254",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js",
+
+ description: "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.get = function () {
+ return "VerifyArgumentsObject";
+ };
+
+ var newObj = Object.create({}, {
+ prop: argObj
+ });
+
+ return newObj.prop === "VerifyArgumentsObject";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js new file mode 100644 index 000000000..b5f200a1f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.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: "15.2.3.5-4-256",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js",
+
+ description: "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ fnGlobalObject().get = function () {
+ return "VerifyGlobalObject";
+ };
+
+ try {
+ var newObj = Object.create({}, {
+ prop: fnGlobalObject()
+ });
+
+ return newObj.prop === "VerifyGlobalObject";
+ } finally {
+ delete fnGlobalObject().get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js new file mode 100644 index 000000000..23e11648f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.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: "15.2.3.5-4-257",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is undefined (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ get: undefined
+ }
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js new file mode 100644 index 000000000..300ebee5f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.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: "15.2.3.5-4-258",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is the primitive value null (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ try {
+ Object.create({}, {
+ prop: {
+ get: null
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js new file mode 100644 index 000000000..04632f92c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.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: "15.2.3.5-4-259",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is a boolean primitive (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ try {
+ Object.create({}, {
+ prop: {
+ get: false
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js new file mode 100644 index 000000000..0fad9b703 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.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: "15.2.3.5-4-26",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js",
+
+ description: "Object.create - TypeError is thrown when own enumerable accessor property of 'Properties' without a get function (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = {};
+ Object.defineProperty(props, "prop", {
+ set: function () { },
+ enumerable: true
+ });
+ try {
+ Object.create({}, props);
+
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js new file mode 100644 index 000000000..0c5c5c099 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.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: "15.2.3.5-4-260",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is a number primitive (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ try {
+ Object.create({}, {
+ prop: {
+ get: 123
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js new file mode 100644 index 000000000..5e42b3a7b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.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: "15.2.3.5-4-261",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is a primitive string (8.10.5 step 7.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ get: "string"
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js new file mode 100644 index 000000000..81e1a42ed --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.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: "15.2.3.5-4-262",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is an Array object (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ try {
+ Object.create({}, {
+ prop: {
+ get: [1, 2, 3]
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js new file mode 100644 index 000000000..2784ecc79 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.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: "15.2.3.5-4-263",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js",
+
+ description: "Object.create - 'get' property of one property in 'Properties' is a function (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ get: function () { }
+ }
+ });
+
+ return newObj.hasOwnProperty("prop") && typeof newObj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js new file mode 100644 index 000000000..c9d15acc6 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.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: "15.2.3.5-4-266",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is present (8.10.5 step 8)",
+
+ test: function testcase() {
+ var data = "data";
+
+ var newObj = Object.create({}, {
+ prop: {
+ set: function (value) {
+ data = value;
+ }
+ }
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js new file mode 100644 index 000000000..c5ad9b3a9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.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: "15.2.3.5-4-267",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is not present (8.10.5 step 8)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ get: function () {
+ return "data";
+ }
+ }
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && newObj.prop === "data";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js new file mode 100644 index 000000000..d7bee0a64 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.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: "15.2.3.5-4-268",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+
+ var newObj = Object.create({}, {
+ prop: {
+ set: function (value) {
+ data = value;
+ }
+ }
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js new file mode 100644 index 000000000..49dbb34a3 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js @@ -0,0 +1,55 @@ +/// 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: "15.2.3.5-4-269",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is an inherited data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+ var proto = {
+ set: function (value) {
+ data = value;
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js new file mode 100644 index 000000000..0526c8097 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js @@ -0,0 +1,60 @@ +/// 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: "15.2.3.5-4-27",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js",
+
+ description: "Object.create - own enumerable accessor property in 'Properties' without a get function that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "prop", {
+ get: function () {
+ return {};
+ },
+ enumerable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "prop", {
+ set: function () { },
+ enumerable: true
+ });
+
+ try {
+ Object.create({}, child);
+
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js new file mode 100644 index 000000000..272e96f54 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.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: "15.2.3.5-4-270",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data1 = "data";
+ var data2 = "data";
+ var proto = {
+ set: function (value) {
+ data2 = value;
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+ child.set = function (value) {
+ data1 = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data1 === "overrideData" && data2 === "data";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js new file mode 100644 index 000000000..1d3fedc6e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js @@ -0,0 +1,65 @@ +/// 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: "15.2.3.5-4-271",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data1 = "data";
+ var data2 = "data";
+
+ var proto = {};
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data2 = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ value: function (value) {
+ data1 = value;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data1 === "overrideData" && data2 === "data";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js new file mode 100644 index 000000000..e90476324 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js @@ -0,0 +1,55 @@ +/// 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: "15.2.3.5-4-272",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+ var descObj = {};
+
+ Object.defineProperty(descObj, "set", {
+ get: function () {
+ return function (value) {
+ data = value;
+ };
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js new file mode 100644 index 000000000..a821de866 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.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: "15.2.3.5-4-273",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+ var proto = {};
+
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js new file mode 100644 index 000000000..5064d3a0a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js @@ -0,0 +1,63 @@ +/// 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: "15.2.3.5-4-274",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data1 = "data";
+ var data2 = "data";
+
+ var proto = {};
+ proto.set = function (value) {
+ data2 = value;
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ get: function () {
+ return function (value) {
+ data1 = value;
+ };
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data1 === "overrideData" && data2 === "data";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js new file mode 100644 index 000000000..4f1e7b364 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js @@ -0,0 +1,67 @@ +/// 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: "15.2.3.5-4-275",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data1 = "data";
+ var data2 = "data";
+ var proto = {};
+
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data2 = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ get: function () {
+ return function (value) {
+ data1 = value;
+ };
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data1 === "overrideData" && data2 === "data";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js new file mode 100644 index 000000000..e334d5599 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.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: "15.2.3.5-4-276",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var descObj = {};
+ Object.defineProperty(descObj, "set", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ var desc = Object.getOwnPropertyDescriptor(newObj, "prop");
+
+ return hasProperty && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js new file mode 100644 index 000000000..86ea79b5a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js @@ -0,0 +1,56 @@ +/// 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: "15.2.3.5-4-277",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function () { };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(newObj, "prop");
+
+ return newObj.hasOwnProperty("prop") && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js new file mode 100644 index 000000000..feeec97b2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-278",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "set", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var child = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: child
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(newObj, "prop");
+
+ return newObj.hasOwnProperty("prop") && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js new file mode 100644 index 000000000..11abe025c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.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: "15.2.3.5-4-279",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js",
+
+ description: "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var funObj = function () { };
+ var data = "data";
+ funObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: funObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js new file mode 100644 index 000000000..6bb74fa5e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js @@ -0,0 +1,43 @@ +/// 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: "15.2.3.5-4-28",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js",
+
+ description: "Object.create - 'Properties' is a Function object which implements its own [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = function () { };
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js new file mode 100644 index 000000000..12e6ab82c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.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: "15.2.3.5-4-280",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js",
+
+ description: "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var data = "data";
+ arrObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: arrObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js new file mode 100644 index 000000000..da1dce817 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.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: "15.2.3.5-4-281",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js",
+
+ description: "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var strObj = new String();
+ var data = "data";
+ strObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: strObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js new file mode 100644 index 000000000..233539a65 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.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: "15.2.3.5-4-282",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js",
+
+ description: "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var boolObj = new Boolean(true);
+ var data = "data";
+ boolObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: boolObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js new file mode 100644 index 000000000..06403600c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.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: "15.2.3.5-4-283",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js",
+
+ description: "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var numObj = new Number(5);
+ var data = "data";
+ numObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: numObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js new file mode 100644 index 000000000..ab9c902aa --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.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: "15.2.3.5-4-284",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js",
+
+ description: "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+
+ try {
+ Math.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: Math
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ } finally {
+ delete Math.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js new file mode 100644 index 000000000..f98c0aace --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.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: "15.2.3.5-4-285",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var dateObj = new Date();
+ var data = "data";
+ dateObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: dateObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js new file mode 100644 index 000000000..edfd3d2f5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.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: "15.2.3.5-4-286",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js",
+
+ description: "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var regObj = new RegExp();
+ var data = "data";
+ regObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: regObj
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js new file mode 100644 index 000000000..6f171f489 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.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: "15.2.3.5-4-287",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js",
+
+ description: "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+
+ try {
+ JSON.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: JSON
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ } finally {
+ delete JSON.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js new file mode 100644 index 000000000..e9637b6e5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.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: "15.2.3.5-4-288",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js",
+
+ description: "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var errObj = new Error("error");
+ var data = "data";
+
+ errObj.set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: errObj
+ });
+
+ newObj.prop = "overrideData";
+
+ return newObj.hasOwnProperty("prop") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js new file mode 100644 index 000000000..408504fcb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-289",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js",
+
+ description: "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var argObj = (function () { return arguments; })();
+
+ var data = "data";
+
+ argObj.set = function (value) {
+ data = value;
+ };
+
+ var newobj = Object.create({}, {
+ prop: argObj
+ });
+
+ var hasProperty = newobj.hasOwnProperty("prop");
+
+ newobj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js new file mode 100644 index 000000000..3517bd4eb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js @@ -0,0 +1,43 @@ +/// 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: "15.2.3.5-4-29",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js",
+
+ description: "Object.create - 'Properties' is an Array object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = [];
+ props.prop = {
+ value: {},
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js new file mode 100644 index 000000000..04a82e57b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.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: "15.2.3.5-4-291",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js",
+
+ description: "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var data = "data";
+
+ try {
+ fnGlobalObject().set = function (value) {
+ data = value;
+ };
+
+ var newObj = Object.create({}, {
+ prop: fnGlobalObject()
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = "overrideData";
+
+ return hasProperty && data === "overrideData";
+ } finally {
+ delete fnGlobalObject().set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js new file mode 100644 index 000000000..bb347b7a9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-292",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is undefined (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ set: undefined
+ }
+ });
+
+ newObj.prop = "overrideData";
+
+ return newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js new file mode 100644 index 000000000..f5ef51643 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.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: "15.2.3.5-4-293",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is a primitive value null (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: null
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js new file mode 100644 index 000000000..874fbd6a5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.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: "15.2.3.5-4-294",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is a primitive boolean value true (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: true
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js new file mode 100644 index 000000000..b9afa8100 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.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: "15.2.3.5-4-295",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is a primitive number value (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: 123
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js new file mode 100644 index 000000000..ae5769745 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.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: "15.2.3.5-4-296",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is a primitive string value (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: "abc"
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js new file mode 100644 index 000000000..82fd19713 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.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: "15.2.3.5-4-297",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is an Date object (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: new Date()
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js new file mode 100644 index 000000000..5c270b3fb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.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: "15.2.3.5-4-298",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is a function (8.10.5 step 8.b)",
+
+ test: function testcase() {
+ var data = "data";
+
+ var newObj = Object.create({}, {
+ prop: {
+ set: function (value) {
+ data = value;
+ }
+ }
+ });
+
+ newObj.prop = "overrideData";
+
+ return newObj.hasOwnProperty("prop") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js new file mode 100644 index 000000000..7f4f5b7f0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.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: "15.2.3.5-4-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js",
+
+ description: "Object.create throws TypeError if 'Properties' is null (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, null);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js new file mode 100644 index 000000000..17955b167 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.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: "15.2.3.5-4-30",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js",
+
+ description: "Object.create - 'Properties' is a String object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = new String();
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js new file mode 100644 index 000000000..a4fbebedc --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.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: "15.2.3.5-4-300",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js",
+
+ description: "Object.create - 'set' property of one property in 'Properties' is a host object that isn't callable (8.10.5 step 8.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: fnGlobalObject()
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js new file mode 100644 index 000000000..bec72bc02 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.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: "15.2.3.5-4-301",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js",
+
+ description: "Object.create - TypeError is thrown if both 'set' property and 'value' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: function () { },
+ value: 100
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js new file mode 100644 index 000000000..df14a8f4e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.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: "15.2.3.5-4-302",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js",
+
+ description: "Object.create - TypeError is thrown if both 'set' property and 'writable' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ set: function () { },
+ writable: true
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js new file mode 100644 index 000000000..27b715749 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.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: "15.2.3.5-4-303",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js",
+
+ description: "Object.create - TypeError is thrown if both 'get' property and 'value' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ get: function () { },
+ value: 100
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js new file mode 100644 index 000000000..857f65369 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.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: "15.2.3.5-4-304",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js",
+
+ description: "Object.create - TypeError is thrown if both 'get' property and 'writable' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: {
+ get: function () { },
+ writable: true
+ }
+ });
+
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js new file mode 100644 index 000000000..0fcb46aa9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.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: "15.2.3.5-4-305",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js",
+
+ description: "Object.create defines a data property when one property in 'Properties' is generic descriptor (8.12.9 step 4.a)",
+
+ test: function testcase() {
+
+ try {
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: true
+ }
+ });
+ return newObj.hasOwnProperty("prop");
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js new file mode 100644 index 000000000..0f8359ab3 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.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: "15.2.3.5-4-306",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js",
+
+ description: "Object.create - [[Value]] is set as undefined if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+
+ try {
+ var newObj = Object.create({}, {
+ prop: {
+ writable: true,
+ configurable: true,
+ enumerable: true
+ }
+ });
+ return newObj.hasOwnProperty("prop") && newObj.prop === undefined;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js new file mode 100644 index 000000000..838a2585a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.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: "15.2.3.5-4-307",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js",
+
+ description: "Object.create - [[Writable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ value: 1001,
+ configurable: true,
+ enumerable: true
+ }
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ newObj.prop = 12;
+
+ return hasProperty && newObj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js new file mode 100644 index 000000000..e32e41e67 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.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: "15.2.3.5-4-308",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js",
+
+ description: "Object.create - [[Enumerable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var isEnumerable = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ value: 1001,
+ writable: true,
+ configurable: true
+ }
+ });
+
+ var hasProperty = newObj.hasOwnProperty("prop");
+
+ for (var p in newObj) {
+ if (p === "prop") {
+ isEnumerable = true;
+ }
+ }
+ return hasProperty && !isEnumerable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js new file mode 100644 index 000000000..8cca98796 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.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.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.5-4-309",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js",
+
+ description: "Object.create - [[Configurable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var isNotConfigurable = false;
+
+ try {
+ var newObj = Object.create({}, {
+ prop: {
+ value: 1001,
+ writable: true,
+ enumerable: true
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ isNotConfigurable = newObj.hasOwnProperty("prop");
+ return hasProperty && isNotConfigurable;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js new file mode 100644 index 000000000..57ce1be41 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.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: "15.2.3.5-4-31",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js",
+
+ description: "Object.create - 'Properties' is a Boolean object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = new Boolean(false);
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js new file mode 100644 index 000000000..a55fc0684 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js @@ -0,0 +1,43 @@ +/// 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: "15.2.3.5-4-310",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js",
+
+ description: "Object.create - [[Get]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ set: function () { },
+ enumerable: true,
+ configurable: true
+ }
+ });
+ return newObj.hasOwnProperty("prop") && newObj.prop === undefined;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js new file mode 100644 index 000000000..31f32dffb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js @@ -0,0 +1,66 @@ +/// 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: "15.2.3.5-4-311",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js",
+
+ description: "Object.create - [[Set]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ get: function () {
+ return "verifyCreate";
+ },
+ enumerable: true,
+ configurable: true
+ }
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(newObj, "prop");
+ var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined";
+
+ var verifyGet = false;
+ if (newObj.prop === "verifyCreate") {
+ verifyGet = true;
+ }
+
+ var verifyEnumerable = false;
+ for (var p in newObj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ var verifyConfigurable = false;
+ var hasProperty = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ verifyConfigurable = !newObj.hasOwnProperty("prop") && hasProperty;
+
+ return verifySet && verifyGet && verifyEnumerable && verifyConfigurable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js new file mode 100644 index 000000000..8860d6187 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.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: "15.2.3.5-4-312",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js",
+
+ description: "Object.create - [[Enumerable]] is set as false if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+
+ test: function testcase() {
+ var isEnumerable = false;
+ var newObj = Object.create({}, {
+ prop: {
+ set: function () { },
+ get: function () { },
+ configurable: true
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+ for (var p in newObj) {
+ if (p === "prop") {
+ isEnumerable = true;
+ }
+ }
+ return hasProperty && !isEnumerable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js new file mode 100644 index 000000000..d4f95e7df --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.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: "15.2.3.5-4-313",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js",
+
+ description: "Object.create - [[Configurable]] is set as false if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+
+ test: function testcase() {
+ var newObj = Object.create({}, {
+ prop: {
+ set: function () { },
+ get: function () { },
+ enumerable: true
+ }
+ });
+ var hasProperty = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var isNotConfigurable = newObj.hasOwnProperty("prop");
+ return hasProperty && isNotConfigurable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js new file mode 100644 index 000000000..c16afb672 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js @@ -0,0 +1,39 @@ +/// 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: "15.2.3.5-4-314",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js",
+
+ description: "Object.create - some enumerable own property in 'Properties' is empty object (15.2.3.7 step 7)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ foo: {}
+ });
+ return newObj.hasOwnProperty("foo");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js new file mode 100644 index 000000000..ab1cb1d06 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.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: "15.2.3.5-4-315",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js",
+
+ description: "Object.create - all properties in 'Properties' are enumerable (data property and accessor property) (15.2.3.7 step 7)",
+
+ test: function testcase() {
+
+ var newObj = {};
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ newObj.setVerifyHelpProp = value;
+ }
+
+ newObj = Object.create({}, {
+ foo1: {
+ value: 200,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ },
+ foo2: {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ }
+ });
+ return dataPropertyAttributesAreCorrect(newObj, "foo1", 200, true, true, true) &&
+ accessorPropertyAttributesAreCorrect(newObj, "foo2", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js new file mode 100644 index 000000000..2ee0ce85e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js @@ -0,0 +1,61 @@ +/// 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: "15.2.3.5-4-316",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js",
+
+ description: "Object.create - enumerable properties of 'Properties' are given numerical names (15.2.3.7 step 7)",
+
+ test: function testcase() {
+
+ function getFunc() {
+ return 20;
+ }
+ function setFunc() { }
+
+ var newObj = Object.create({}, {
+ 0: {
+ value: 100,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ },
+ 1: {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ },
+ 2: {
+ value: 200,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ }
+ });
+ return newObj[0] === 100 && newObj[1] === 20 && newObj[2] === 200;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js new file mode 100644 index 000000000..b49f481ea --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.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: "15.2.3.5-4-32",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js",
+
+ description: "Object.create - 'Properties' is a Number object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = new Number(-9);
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js new file mode 100644 index 000000000..c36e0cfb5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-33",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js",
+
+ description: "Object.create - 'Properties' is the Math object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ try {
+ Math.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, Math);
+ return newObj.hasOwnProperty("prop");
+ } finally {
+ delete Math.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js new file mode 100644 index 000000000..00c8b7031 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.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: "15.2.3.5-4-34",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js",
+
+ description: "Object.create - 'Properties' is a Date object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = new Date();
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js new file mode 100644 index 000000000..fcbf74310 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.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: "15.2.3.5-4-35",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js",
+
+ description: "Object.create - 'Properties' is a RegExp object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = new RegExp();
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js new file mode 100644 index 000000000..f9b5f9a9b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-36",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js",
+
+ description: "Object.create - 'Properties' is the JSON object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ try {
+ JSON.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, JSON);
+ return newObj.hasOwnProperty("prop");
+ } finally {
+ delete JSON.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js new file mode 100644 index 000000000..54d2fda6e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.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: "15.2.3.5-4-37",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js",
+
+ description: "Object.create - 'Properties' is an Error object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = new Error("test");
+
+ (Object.getOwnPropertyNames(props)).forEach(function(name){
+ props[name] = {value:11, configurable:true}
+ });
+
+ props.prop = {
+ value: 12,
+ enumerable: true
+ };
+ var newObj = Object.create({}, props);
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Array.prototype.forEach) && fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js new file mode 100644 index 000000000..3f77f50bb --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.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: "15.2.3.5-4-38",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js",
+
+ description: "Object.create - 'Properties' is an Arguments object which implements its own [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.prop = {
+ value: 12,
+ enumerable: true
+ };
+
+ var newObj = Object.create({}, argObj);
+
+ return newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js new file mode 100644 index 000000000..3d8d34967 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js @@ -0,0 +1,55 @@ +/// 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: "15.2.3.5-4-39",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js",
+
+ description: "Object.create - ensure that side-effects of gets occur in the same order as they would for: for (P in props) props[P] (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var props = {};
+ props.prop1 = { value: 12, enumerable: true };
+ props.prop2 = { value: true, enumerable: true };
+
+ var tempArray = [];
+ for (var p in props) {
+ if (props.hasOwnProperty(p)) {
+ tempArray.push(p);
+ }
+ }
+
+ var newObj = Object.create({}, props);
+ var index = 0;
+ for (var q in newObj) {
+ if (tempArray[index++] !== q && newObj.hasOwnProperty(q)) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js new file mode 100644 index 000000000..a2125bf45 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.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: "15.2.3.5-4-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js",
+
+ description: "Object.create - argument 'Properties' is an object (15.2.3.7 step 2).",
+
+ test: function testcase() {
+
+ var props = {};
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Object;
+ return {};
+ },
+ enumerable: true
+ });
+ Object.create({}, props);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js new file mode 100644 index 000000000..321d54356 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js @@ -0,0 +1,65 @@ +/// 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: "15.2.3.5-4-40",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js",
+
+ description: "Object.create - ensure that if an exception is thrown it occurs in the correct order relative to prior and subsequent side-effects (15.2.3.7 step 5.a)",
+
+ test: function testcase() {
+
+ var newObj = {};
+ var props = {};
+ var i = 0;
+
+ Object.defineProperty(props, "prop1", {
+ get: function () {
+ i++;
+ return {};
+ },
+ enumerable: true
+ });
+
+ Object.defineProperty(props, "prop2", {
+ get: function () {
+ if (1 === i++) {
+ throw new RangeError();
+ } else {
+ return {};
+ }
+ },
+ enumerable: true
+ });
+
+ try {
+ newObj = Object.create({}, props);
+ return false;
+ } catch (e) {
+ return (e instanceof RangeError) && !newObj.hasOwnProperty("prop1") && i === 2;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js new file mode 100644 index 000000000..d1f448ab4 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.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: "15.2.3.5-4-41",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js",
+
+ description: "Object.create - value of one property in 'Properties' is undefined (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: undefined
+ });
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js new file mode 100644 index 000000000..9c302a648 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-42",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js",
+
+ description: "Object.create - value of one property in 'Properties' is null (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: null
+ });
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js new file mode 100644 index 000000000..abc9b1a73 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js @@ -0,0 +1,45 @@ +/// 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: "15.2.3.5-4-43",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js",
+
+ description: "Object.create - value of one property in 'Properties' is false (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: false
+ });
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js new file mode 100644 index 000000000..3c3a57790 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.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: "15.2.3.5-4-44",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js",
+
+ description: "Object.create - value of one property in 'Properties' is a number primitive (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: 12
+ });
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js new file mode 100644 index 000000000..b2e5d3814 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.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: "15.2.3.5-4-45",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js",
+
+ description: "Object.create - value of one property in 'Properties' is a string (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.create({}, {
+ prop: "abc"
+ });
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js new file mode 100644 index 000000000..395603e5b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.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: "15.2.3.5-4-46",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is true (8.10.5 step 3)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: true
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js new file mode 100644 index 000000000..c0e737ff7 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.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: "15.2.3.5-4-47",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is not present (8.10.5 step 3)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {}
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js new file mode 100644 index 000000000..3ff789432 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.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: "15.2.3.5-4-48",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: true
+ }
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js new file mode 100644 index 000000000..40dc4092e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js @@ -0,0 +1,56 @@ +/// 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: "15.2.3.5-4-49",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an inherited data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var proto = {
+ enumerable: true
+ };
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js new file mode 100644 index 000000000..c4a2b87b5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.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: "15.2.3.5-4-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js",
+
+ description: "Object.create - argument 'Properties' is a Function object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var props = function () { };
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Function;
+ return {};
+ },
+ enumerable: true
+ });
+ Object.create({}, props);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js new file mode 100644 index 000000000..f06205ad6 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.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: "15.2.3.5-4-50",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var proto = {
+ enumerable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "enumerable", {
+ value: false
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js new file mode 100644 index 000000000..74d269625 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js @@ -0,0 +1,63 @@ +/// 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: "15.2.3.5-4-51",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ var accessed = false;
+
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "enumerable", {
+ value: false
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js new file mode 100644 index 000000000..4d869c5d5 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js @@ -0,0 +1,55 @@ +/// 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: "15.2.3.5-4-52",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var descObj = {};
+ Object.defineProperty(descObj, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js new file mode 100644 index 000000000..1e66e1268 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.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: "15.2.3.5-4-53",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ var accessed = false;
+
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js new file mode 100644 index 000000000..a8ad954ac --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js @@ -0,0 +1,60 @@ +/// 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: "15.2.3.5-4-54",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var proto = {
+ enumerable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "enumerable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js new file mode 100644 index 000000000..a0d7ce943 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js @@ -0,0 +1,63 @@ +/// 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: "15.2.3.5-4-55",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ var accessed = false;
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "enumerable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js new file mode 100644 index 000000000..3ceba72f2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-56",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = {};
+ Object.defineProperty(descObj, "enumerable", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js new file mode 100644 index 000000000..54a9ec7ac --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js @@ -0,0 +1,61 @@ +/// 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: "15.2.3.5-4-57",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var proto = {};
+ var accessed = false;
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ Object.defineProperty(descObj, "enumerable", {
+ set: function () { }
+ });
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js new file mode 100644 index 000000000..d628526f9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js @@ -0,0 +1,57 @@ +/// 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: "15.2.3.5-4-58",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+
+ var proto = {};
+ var accessed = false;
+
+ Object.defineProperty(proto, "enumerable", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var descObj = new ConstructFun();
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js new file mode 100644 index 000000000..368d339e1 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.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: "15.2.3.5-4-59",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js",
+
+ description: "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = function () { };
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js new file mode 100644 index 000000000..095e6c935 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.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: "15.2.3.5-4-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js",
+
+ description: "Object.create - argument 'Properties' is an Array object (15.2.3.7 step 2).",
+
+ test: function testcase() {
+
+ var props = [];
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Array;
+ return {};
+ },
+ enumerable: true
+ });
+ Object.create({}, props);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js new file mode 100644 index 000000000..1ca25dea9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-60",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js",
+
+ description: "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+
+ var accessed = false;
+ var descObj = [];
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js new file mode 100644 index 000000000..0796a6de8 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.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: "15.2.3.5-4-61",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js",
+
+ description: "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = new String();
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js new file mode 100644 index 000000000..bb0fcf2a2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.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: "15.2.3.5-4-62",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js",
+
+ description: "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = new Boolean(false);
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js new file mode 100644 index 000000000..001c6426b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.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: "15.2.3.5-4-63",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js",
+
+ description: "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = new Number(-9);
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js new file mode 100644 index 000000000..6a0c939a3 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.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: "15.2.3.5-4-64",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js",
+
+ description: "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ try {
+ Math.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: Math
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ } finally {
+ delete Math.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js new file mode 100644 index 000000000..b4ef9fefa --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.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: "15.2.3.5-4-65",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js",
+
+ description: "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = new Date();
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js new file mode 100644 index 000000000..b64fa7662 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.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: "15.2.3.5-4-66",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js",
+
+ description: "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = new RegExp();
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js new file mode 100644 index 000000000..a7693f3d4 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.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: "15.2.3.5-4-67",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js",
+
+ description: "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ try {
+ JSON.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: JSON
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ } finally {
+ delete JSON.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js new file mode 100644 index 000000000..f007a5690 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.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: "15.2.3.5-4-68",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js",
+
+ description: "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var descObj = new Error();
+
+ descObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js new file mode 100644 index 000000000..17c7c07da --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.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: "15.2.3.5-4-69",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js",
+
+ description: "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var argObj = (function () { return arguments; })();
+
+ argObj.enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: argObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js new file mode 100644 index 000000000..366c36723 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.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: "15.2.3.5-4-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js",
+
+ description: "Object.create - argument 'Properties' is a String object (15.2.3.7 step 2)",
+
+ test: function testcase() {
+
+ var props = new String();
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof String;
+ return {};
+ },
+ enumerable: true
+ });
+ Object.create({}, props);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js new file mode 100644 index 000000000..0f79f4454 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.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: "15.2.3.5-4-71",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js",
+
+ description: "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ try {
+ fnGlobalObject().enumerable = true;
+
+ var newObj = Object.create({}, {
+ prop: fnGlobalObject()
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ } finally {
+ delete fnGlobalObject().enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js new file mode 100644 index 000000000..08e2374b9 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.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: "15.2.3.5-4-72",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is undefined (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: undefined
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js new file mode 100644 index 000000000..412aca318 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.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: "15.2.3.5-4-73",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js",
+
+ description: "Object.create - value of 'enumerable' property of one property in 'Properties' is null (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: null
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js new file mode 100644 index 000000000..e352ca613 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.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: "15.2.3.5-4-74",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is true (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: true
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js new file mode 100644 index 000000000..10a06c8dd --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js @@ -0,0 +1,51 @@ +/// 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: "15.2.3.5-4-75",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is false (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+
+ var accessed = false;
+ var descObj = {
+ enumerable: false
+ };
+
+ var newObj = Object.create({}, {
+ prop: descObj
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js new file mode 100644 index 000000000..a0efadb4b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.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: "15.2.3.5-4-76",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is 0 (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: 0
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js new file mode 100644 index 000000000..4035cf762 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.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: "15.2.3.5-4-77",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is +0 (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: +0
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js new file mode 100644 index 000000000..eb0a96fb2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.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: "15.2.3.5-4-78",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is -0 (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: -0
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js new file mode 100644 index 000000000..32dcc6343 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.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: "15.2.3.5-4-79",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is NaN (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: NaN
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js new file mode 100644 index 000000000..2a00a5e4a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.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: "15.2.3.5-4-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js",
+
+ description: "Object.create - argument 'Properties' is a Boolean object whose primitive value is true (15.2.3.7 step 2).",
+
+ test: function testcase() {
+
+ var props = new Boolean(true);
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Boolean;
+ return {};
+ },
+ enumerable: true
+ });
+ Object.create({}, props);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js new file mode 100644 index 000000000..f4b5d28d1 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.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: "15.2.3.5-4-80",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a positive number primitive (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: 12
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js new file mode 100644 index 000000000..4e81d4b09 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.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: "15.2.3.5-4-81",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a negative number primitive (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: -9
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js new file mode 100644 index 000000000..7e1ed2554 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.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: "15.2.3.5-4-82",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an empty string (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: ""
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return !accessed && newObj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js new file mode 100644 index 000000000..e2a07cbf0 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.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: "15.2.3.5-4-83",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a non-empty string (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: "AB\n\\cd"
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js new file mode 100644 index 000000000..efb60bf6f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.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: "15.2.3.5-4-84",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a Function object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: function () { }
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js new file mode 100644 index 000000000..0f5b32be7 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.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: "15.2.3.5-4-85",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an Array object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: []
+ }
+ });
+
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js new file mode 100644 index 000000000..ab2df3893 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.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: "15.2.3.5-4-86",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a String object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new String()
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js new file mode 100644 index 000000000..5cd791f7c --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.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: "15.2.3.5-4-87",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a Boolean object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new Boolean(true)
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js new file mode 100644 index 000000000..efa1af1c8 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.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: "15.2.3.5-4-88",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a Number object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new Number(-9)
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js new file mode 100644 index 000000000..7a7809345 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.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: "15.2.3.5-4-89",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is the Math object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: Math
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js new file mode 100644 index 000000000..3d33ee9ca --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.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: "15.2.3.5-4-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js",
+
+ description: "Object.create - argument 'Properties' is a Number object whose primitive value is any interesting number (15.2.3.7 step 2).",
+
+ test: function testcase() {
+
+ var props = new Number(12);
+ var result = false;
+
+ Object.defineProperty(props, "prop", {
+ get: function () {
+ result = this instanceof Number;
+ return {};
+ },
+ enumerable: true
+ });
+ Object.create({}, props);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js new file mode 100644 index 000000000..bd43a34d2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.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: "15.2.3.5-4-90",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a Date object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new Date()
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js new file mode 100644 index 000000000..df148257e --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.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: "15.2.3.5-4-91",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a RegExp object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new RegExp()
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js new file mode 100644 index 000000000..ef802b3ca --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.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: "15.2.3.5-4-92",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is the JSON object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: JSON
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js new file mode 100644 index 000000000..d8376294d --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.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: "15.2.3.5-4-93",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an Error object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new Error()
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js new file mode 100644 index 000000000..522bb1e4a --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.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: "15.2.3.5-4-94",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is an Arguments object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var argObj = (function () { return arguments; })();
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: argObj
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js new file mode 100644 index 000000000..fb5c453c2 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.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: "15.2.3.5-4-96",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is the global object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: fnGlobalObject()
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js new file mode 100644 index 000000000..59125fbe7 --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.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: "15.2.3.5-4-97",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is a string (value is 'false'), which is treated as the value true (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: "false"
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js new file mode 100644 index 000000000..a879a417b --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.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: "15.2.3.5-4-98",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js",
+
+ description: "Object.create - 'enumerable' property of one property in 'Properties' is new Boolean(false), which is treated as the value true (8.10.5 step 3.b)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var newObj = Object.create({}, {
+ prop: {
+ enumerable: new Boolean(false)
+ }
+ });
+ for (var property in newObj) {
+ if (property === "prop") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js new file mode 100644 index 000000000..5f7306b4f --- /dev/null +++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.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: "15.2.3.5-4-99",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js",
+
+ description: "Object.create - 'configurable' property of one property in 'Properties' is true (8.10.5 step 4)",
+
+ test: function testcase() {
+
+ var newObj = Object.create({}, {
+ prop: {
+ configurable: true
+ }
+ });
+
+ var result1 = newObj.hasOwnProperty("prop");
+ delete newObj.prop;
+ var result2 = newObj.hasOwnProperty("prop");
+
+ return result1 === true && result2 === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
|