File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ has
2+ has
3+ has
4+ has
5+ has
6+ has
7+ PASS
Original file line number Diff line number Diff line change 1+ //-------------------------------------------------------------------------------------------------------
2+ // Copyright (C) Microsoft. All rights reserved.
3+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+ //-------------------------------------------------------------------------------------------------------
5+
6+ var proxyHandler = {
7+ has ( ) { WScript . Echo ( "has" ) ; return true ; }
8+ } ;
9+ var p = new Proxy ( { } , proxyHandler ) ;
10+ var obj = { } ;
11+
12+ try {
13+ Object . defineProperty ( obj , "x" , p ) ;
14+ } catch ( e ) {
15+ if ( e instanceof TypeError ) {
16+ if ( e . message !== "Invalid property descriptor: cannot both specify accessors and a 'value' attribute" ) {
17+ print ( 'FAIL' ) ;
18+ } else {
19+ print ( 'PASS' ) ;
20+ }
21+ } else {
22+ print ( 'FAIL' ) ;
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ function test2() {
4545 print ( 'Expected to throw TypeError' ) ;
4646 } catch ( e ) {
4747 if ( e instanceof TypeError ) {
48- if ( e . message !== 'Property cannot have both accessors and a value') {
48+ if ( e . message !== "Invalid property descriptor: cannot both specify accessors and a ' value' attribute" ) {
4949 print ( 'FAIL' ) ;
5050 }
5151 } else {
Original file line number Diff line number Diff line change 688688 <compile-flags >-args summary -endargs</compile-flags >
689689 </default >
690690 </test >
691+ <test >
692+ <default >
693+ <files >proxy-issue884.js</files >
694+ <baseline >proxy-issue884.baseline</baseline >
695+ </default >
696+ </test >
691697 <test >
692698 <default >
693699 <files >object-is.js</files >
You can’t perform that action at this time.
0 commit comments