blob: 0232b2561f4325ea03ba6e88c2167c08774bf2fc [file] [edit]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
for (var i = 0; i < testLoopCount; ++i) {
var promise = new Promise(function() { });
shouldBe(promise.__proto__, Promise.prototype);
}
class DerivedPromise extends Promise {
};
for (var i = 0; i < testLoopCount; ++i) {
var promise = new DerivedPromise(function() { });
shouldBe(promise.__proto__, DerivedPromise.prototype);
}
for (var i = 0; i < testLoopCount; ++i) {
var promise = new Promise(function() { });
shouldBe(promise.__proto__, Promise.prototype);
}
for (var i = 0; i < testLoopCount; ++i) {
var promise = new DerivedPromise(function() { });
shouldBe(promise.__proto__, DerivedPromise.prototype);
}