summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/seal/object-seal-inherited-accessor-properties-are-ignored.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/test262/built-ins/Object/seal/object-seal-inherited-accessor-properties-are-ignored.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/seal/object-seal-inherited-accessor-properties-are-ignored.js b/js/src/tests/test262/built-ins/Object/seal/object-seal-inherited-accessor-properties-are-ignored.js
new file mode 100644
index 0000000000..39f5aaeaa8
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/seal/object-seal-inherited-accessor-properties-are-ignored.js
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-setintegritylevel
+description: Object.seal - inherited accessor properties are ignored
+---*/
+
+var proto = {};
+
+Object.defineProperty(proto, "Father", {
+ get: function() {
+ return 10;
+ },
+ configurable: true
+});
+
+var ConstructFun = function() {};
+ConstructFun.prototype = proto;
+
+var child = new ConstructFun();
+var preCheck = Object.isExtensible(child);
+Object.seal(child);
+
+var beforeDeleted = proto.hasOwnProperty("Father");
+delete proto.Father;
+var afterDeleted = proto.hasOwnProperty("Father");
+
+assert(preCheck, 'preCheck !== true');
+assert(beforeDeleted, 'beforeDeleted !== true');
+assert.sameValue(afterDeleted, false, 'afterDeleted');
+
+reportCompare(0, 0);