blob: f21a43402e478dd86c7abada8544053a6ba75ab3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
|