diff options
author | Michael Ficarra <git@michael.ficarra.me> | 2018-03-07 10:05:45 -0800 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2018-03-07 14:09:45 -0500 |
commit | 7d5a5fef369f8054c6bf8d15c8cbbef1973aae01 (patch) | |
tree | eccb7f4349b7dfdff4eafe610d3adb69854faa71 | |
parent | 83ffb4bbf2a7a2f68075c8e611525b55ea5cfecc (diff) | |
download | qtdeclarative-testsuites-7d5a5fef369f8054c6bf8d15c8cbbef1973aae01.tar.gz |
add Function.prototype.toString result for callable proxies
-rw-r--r-- | test/built-ins/Function/prototype/toString/proxy.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/built-ins/Function/prototype/toString/proxy.js b/test/built-ins/Function/prototype/toString/proxy.js new file mode 100644 index 000000000..fa5c39b94 --- /dev/null +++ b/test/built-ins/Function/prototype/toString/proxy.js @@ -0,0 +1,17 @@ +// Copyright (C) 2018 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-function.prototype.tostring +description: Function.prototype.toString on a proxied function +info: | + Function.prototype.toString accepts any callable, including proxied + functions, and produces a NativeFunction +includes: [nativeFunctionMatcher.js] +---*/ + +const f = new Proxy(function(){}, {}); +assertNativeFunction(f); + +const g = new Proxy(f, { apply() {} }); +assertNativeFunction(g); |