diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/prototype/__proto__/set-ordinary-obj.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Object/prototype/__proto__/set-ordinary-obj.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/prototype/__proto__/set-ordinary-obj.js b/js/src/tests/test262/built-ins/Object/prototype/__proto__/set-ordinary-obj.js new file mode 100644 index 0000000000..f21a43402e --- /dev/null +++ b/js/src/tests/test262/built-ins/Object/prototype/__proto__/set-ordinary-obj.js @@ -0,0 +1,22 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-object.prototype.__proto__ +es6id: B.2.2.1 +description: Setting valid value on an ordinary object +info: | + [...] + 4. Let status be ? O.[[SetPrototypeOf]](proto). + 5. If status is false, throw a TypeError exception. + 6. Return undefined. +features: [__proto__] +---*/ + +var set = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; +var proto = {}; +var subject = {}; + +assert.sameValue(set.call(subject, proto), undefined); +assert.sameValue(Object.getPrototypeOf(subject), proto); + +reportCompare(0, 0); |