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

Side by Side Diff: test/mjsunit/es6/mirror-symbols.js

Issue 421313004: Enable ES6 Symbols by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/debug-script.js ('k') | test/mjsunit/es6/regress/regress-crbug-346141.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 // Flags: --expose-debug-as debug --harmony-symbols 5 // Flags: --expose-debug-as debug
6 // Test the mirror object for symbols. 6 // Test the mirror object for symbols.
7 7
8 function testSymbolMirror(symbol, description) { 8 function testSymbolMirror(symbol, description) {
9 // Create mirror and JSON representation. 9 // Create mirror and JSON representation.
10 var mirror = debug.MakeMirror(symbol); 10 var mirror = debug.MakeMirror(symbol);
11 var serializer = debug.MakeMirrorSerializer(); 11 var serializer = debug.MakeMirrorSerializer();
12 var json = JSON.stringify(serializer.serializeValue(mirror)); 12 var json = JSON.stringify(serializer.serializeValue(mirror));
13 13
14 // Check the mirror hierachy. 14 // Check the mirror hierachy.
15 assertTrue(mirror instanceof debug.Mirror); 15 assertTrue(mirror instanceof debug.Mirror);
(...skipping 13 matching lines...) Expand all
29 var fromJSON = eval('(' + json + ')'); 29 var fromJSON = eval('(' + json + ')');
30 assertEquals('symbol', fromJSON.type); 30 assertEquals('symbol', fromJSON.type);
31 assertEquals(description, fromJSON.description); 31 assertEquals(description, fromJSON.description);
32 } 32 }
33 33
34 // Test a number of different symbols. 34 // Test a number of different symbols.
35 testSymbolMirror(Symbol("a"), "a"); 35 testSymbolMirror(Symbol("a"), "a");
36 testSymbolMirror(Symbol(12), "12"); 36 testSymbolMirror(Symbol(12), "12");
37 testSymbolMirror(Symbol.for("b"), "b"); 37 testSymbolMirror(Symbol.for("b"), "b");
38 testSymbolMirror(Symbol(), undefined); 38 testSymbolMirror(Symbol(), undefined);
OLDNEW
« no previous file with comments | « test/mjsunit/debug-script.js ('k') | test/mjsunit/es6/regress/regress-crbug-346141.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698