diff options
Diffstat (limited to 'js/src/tests/test262/ch08/8.12/8.12.9')
6 files changed, 96 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js new file mode 100644 index 000000000..84ea47532 --- /dev/null +++ b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-b-i_1.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch08/8.12/8.12.9/8.12.9-9-b-i_1.js
+ * @description Redefine a configurable data property to be an accessor property on a newly non-extensible object
+ */
+
+
+function testcase() {
+ var o = {};
+ Object.defineProperty(o, "foo",
+ { value: "hello",
+ configurable: true});
+ Object.preventExtensions(o);
+ Object.defineProperty(o, "foo", { get: function() { return 5;} });
+
+ var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo");
+ return o.foo===5 && fooDescrip.get!==undefined && fooDescrip.set===undefined && fooDescrip.value===undefined && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===undefined;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js new file mode 100644 index 000000000..f7ba3048a --- /dev/null +++ b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-b-i_2.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch08/8.12/8.12.9/8.12.9-9-b-i_2.js
+ * @description Redefine a configurable data property to be an accessor property on a newly non-extensible object
+ */
+
+
+function testcase() {
+ var o = {};
+ Object.defineProperty(o, "foo",
+ { value: "hello",
+ configurable: true,
+ enumerable: true,
+ writable: true});
+ Object.preventExtensions(o);
+ Object.defineProperty(o, "foo", { get: function() { return 5;} });
+
+ var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo");
+ return o.foo===5 && fooDescrip.get!==undefined && fooDescrip.set===undefined && fooDescrip.value===undefined && fooDescrip.configurable===true && fooDescrip.enumerable===true && fooDescrip.writable===undefined;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js new file mode 100644 index 000000000..bef7ddc7d --- /dev/null +++ b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-c-i_1.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch08/8.12/8.12.9/8.12.9-9-c-i_1.js
+ * @description Redefine a configurable accessor property to be a data property on a non-extensible object
+ */
+
+
+function testcase() {
+ var o = {};
+ Object.defineProperty(o, "foo",
+ { get: function() { return 5;},
+ configurable: true});
+ Object.preventExtensions(o);
+ Object.defineProperty(o, "foo", { value: "hello"});
+
+ var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo");
+ return o.foo==="hello" && fooDescrip.get===undefined && fooDescrip.set===undefined && fooDescrip.value==="hello" && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===false;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js new file mode 100644 index 000000000..0c4833ab6 --- /dev/null +++ b/js/src/tests/test262/ch08/8.12/8.12.9/8.12.9-9-c-i_2.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch08/8.12/8.12.9/8.12.9-9-c-i_2.js
+ * @description Redefine a configurable accessor property to be a data property on a non-extensible object
+ */
+
+
+function testcase() {
+ var o = {};
+ Object.defineProperty(o, "foo",
+ { get: function() { return 5;},
+ configurable: true});
+ Object.preventExtensions(o);
+ Object.defineProperty(o, "foo",
+ { value: "hello",
+ writable: true});
+
+ var fooDescrip = Object.getOwnPropertyDescriptor(o, "foo");
+ return o.foo==="hello" && fooDescrip.get===undefined && fooDescrip.set===undefined && fooDescrip.value==="hello" && fooDescrip.configurable===true && fooDescrip.enumerable===false && fooDescrip.writable===true;
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch08/8.12/8.12.9/browser.js b/js/src/tests/test262/ch08/8.12/8.12.9/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch08/8.12/8.12.9/browser.js diff --git a/js/src/tests/test262/ch08/8.12/8.12.9/shell.js b/js/src/tests/test262/ch08/8.12/8.12.9/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch08/8.12/8.12.9/shell.js |