Sign in
webkit
/
WebKit
/
fd10f760421d170d3c112a898afd0d8277e3af75
/
.
/
JSTests
/
es6
/
Promise_is_subclassable_correct_prototype_chain.js
blob: 0138a03aac07d5b1f82afc7c494e50f3ffe3c449 [
file
] [
log
] [
blame
]
function
test
()
{
class
C extends
Promise
{}
var
c
=
new
C
(
function
(
resolve
,
reject
)
{
resolve
(
"foo"
);
});
return
c instanceof C
&&
c instanceof
Promise
&&
Object
.
getPrototypeOf
(
C
)
===
Promise
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);