Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: test/mjsunit/modules-namespace1.js

Issue 2397603003: [runtime] Let native setters have a return value. (Closed)
Patch Set: Ouch. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/es6/reflect.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // MODULE 5 // MODULE
6 6
7 let ja = 42; 7 let ja = 42;
8 export {ja as yo}; 8 export {ja as yo};
9 export const bla = "blaa"; 9 export const bla = "blaa";
10 export {foo as foo_again}; 10 export {foo as foo_again};
(...skipping 14 matching lines...) Expand all
25 assertEquals( 25 assertEquals(
26 ["bla", "foo_again", "yo", Symbol.toStringTag, Symbol.iterator], 26 ["bla", "foo_again", "yo", Symbol.toStringTag, Symbol.iterator],
27 Reflect.ownKeys(foo)); 27 Reflect.ownKeys(foo));
28 28
29 // Its "yo" property. 29 // Its "yo" property.
30 assertEquals( 30 assertEquals(
31 {value: 42, enumerable: true, configurable: false, writable: true}, 31 {value: 42, enumerable: true, configurable: false, writable: true},
32 Reflect.getOwnPropertyDescriptor(foo, "yo")); 32 Reflect.getOwnPropertyDescriptor(foo, "yo"));
33 assertFalse(Reflect.deleteProperty(foo, "yo")); 33 assertFalse(Reflect.deleteProperty(foo, "yo"));
34 assertTrue(Reflect.has(foo, "yo")); 34 assertTrue(Reflect.has(foo, "yo"));
35 // TODO(neis): The next three should be False. 35 assertFalse(Reflect.set(foo, "yo", true));
36 assertTrue(Reflect.set(foo, "yo", true)); 36 // TODO(neis): The next two should be False.
37 assertTrue(Reflect.defineProperty(foo, "yo", 37 assertTrue(Reflect.defineProperty(foo, "yo",
38 Reflect.getOwnPropertyDescriptor(foo, "yo"))); 38 Reflect.getOwnPropertyDescriptor(foo, "yo")));
39 assertTrue(Reflect.defineProperty(foo, "yo", {})); 39 assertTrue(Reflect.defineProperty(foo, "yo", {}));
40 assertFalse(Reflect.defineProperty(foo, "yo", {get() {return 1}})); 40 assertFalse(Reflect.defineProperty(foo, "yo", {get() {return 1}}));
41 assertEquals(42, Reflect.get(foo, "yo")); 41 assertEquals(42, Reflect.get(foo, "yo"));
42 assertEquals(43, (ja++, foo.yo)); 42 assertEquals(43, (ja++, foo.yo));
43 43
44 // Its "foo_again" property. 44 // Its "foo_again" property.
45 assertSame(foo, foo.foo_again); 45 assertSame(foo, foo.foo_again);
46 46
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 assertFalse(Reflect.has(foo, key)); 98 assertFalse(Reflect.has(foo, key));
99 } 99 }
100 100
101 // The actual star import that we are testing. Namespace imports are 101 // The actual star import that we are testing. Namespace imports are
102 // initialized before evaluation. 102 // initialized before evaluation.
103 import * as foo from "modules-namespace1.js"; 103 import * as foo from "modules-namespace1.js";
104 104
105 // There can be only one namespace object. 105 // There can be only one namespace object.
106 import * as bar from "modules-namespace1.js"; 106 import * as bar from "modules-namespace1.js";
107 assertSame(foo, bar); 107 assertSame(foo, bar);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/reflect.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698