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

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

Issue 2557923004: [modules] Remove outdated TODO in module namespace objects test (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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};
11 // See further below for the actual star import that declares "foo". 11 // See further below for the actual star import that declares "foo".
12 12
13 // The object itself. 13 // The object itself.
14 assertEquals("object", typeof foo); 14 assertEquals("object", typeof foo);
15 assertThrows(() => foo = 666, TypeError); 15 assertThrows(() => foo = 666, TypeError);
16 assertFalse(Reflect.isExtensible(foo)); 16 assertFalse(Reflect.isExtensible(foo));
17 assertTrue(Reflect.preventExtensions(foo)); 17 assertTrue(Reflect.preventExtensions(foo));
18 assertThrows(() => Reflect.apply(foo, {}, [])); 18 assertThrows(() => Reflect.apply(foo, {}, []));
19 assertThrows(() => Reflect.construct(foo, {}, [])); 19 assertThrows(() => Reflect.construct(foo, {}, []));
20 assertSame(null, Reflect.getPrototypeOf(foo)); 20 assertSame(null, Reflect.getPrototypeOf(foo));
21 // TODO(neis): The next one should be False.
22 assertTrue(Reflect.setPrototypeOf(foo, null)); 21 assertTrue(Reflect.setPrototypeOf(foo, null));
23 assertFalse(Reflect.setPrototypeOf(foo, {})); 22 assertFalse(Reflect.setPrototypeOf(foo, {}));
24 assertSame(null, Reflect.getPrototypeOf(foo)); 23 assertSame(null, Reflect.getPrototypeOf(foo));
25 assertEquals( 24 assertEquals(
26 ["bla", "foo_again", "yo", Symbol.toStringTag, Symbol.iterator], 25 ["bla", "foo_again", "yo", Symbol.toStringTag, Symbol.iterator],
27 Reflect.ownKeys(foo)); 26 Reflect.ownKeys(foo));
28 27
29 // Its "yo" property. 28 // Its "yo" property.
30 assertEquals( 29 assertEquals(
31 {value: 42, enumerable: true, configurable: false, writable: true}, 30 {value: 42, enumerable: true, configurable: false, writable: true},
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 assertFalse(Reflect.has(foo, key)); 97 assertFalse(Reflect.has(foo, key));
99 } 98 }
100 99
101 // The actual star import that we are testing. Namespace imports are 100 // The actual star import that we are testing. Namespace imports are
102 // initialized before evaluation. 101 // initialized before evaluation.
103 import * as foo from "modules-namespace1.js"; 102 import * as foo from "modules-namespace1.js";
104 103
105 // There can be only one namespace object. 104 // There can be only one namespace object.
106 import * as bar from "modules-namespace1.js"; 105 import * as bar from "modules-namespace1.js";
107 assertSame(foo, bar); 106 assertSame(foo, bar);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698