| // Copyright (C) 2015 the V8 project authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| `Promise.resolve` invoked on a constructor value |
| 1. Let C be the this value. |
| 4. Let promiseCapability be NewPromiseCapability(C). |
| 8. Return promiseCapability.[[Promise]]. |
| class SubPromise extends Promise { |
| var instance = Promise.resolve.call(SubPromise); |
| assert.sameValue(instance.constructor, SubPromise); |
| assert.sameValue(instance instanceof SubPromise, true); |
| assert.sameValue(callCount, 1); |
| assert.sameValue(typeof executor, 'function'); |