diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/S15.3.3.1_A4.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Function/prototype/S15.3.3.1_A4.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/S15.3.3.1_A4.js b/js/src/tests/test262/built-ins/Function/prototype/S15.3.3.1_A4.js new file mode 100644 index 0000000000..a5b8cb8e4f --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/S15.3.3.1_A4.js @@ -0,0 +1,28 @@ +// Copyright 2011 Google Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Detects whether the value of a function's "prototype" property + as seen by normal object operations might deviate from the value + as seem by Object.getOwnPropertyDescriptor +es5id: 15.3.3.1_A4 +description: > + Checks if reading a function's .prototype directly agrees with + reading it via Object.getOwnPropertyDescriptor, after having set + it by Object.defineProperty. +---*/ + +function foo() {} + +Object.defineProperty(foo, 'prototype', { + value: {} +}); + +assert.sameValue( + foo.prototype, + Object.getOwnPropertyDescriptor(foo, 'prototype').value, + 'The value of foo.prototype is expected to equal the value of Object.getOwnPropertyDescriptor(foo, \'prototype\').value' +); + +reportCompare(0, 0); |