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

Unified Diff: test/mjsunit/harmony/symbols.js

Issue 12422019: ES6 symbols: prevent reflection and proxy APIs from leaking symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deal with Object.observe as well Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/harmony/proxies-symbols.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/symbols.js
diff --git a/test/mjsunit/harmony/symbols.js b/test/mjsunit/harmony/symbols.js
index 1d98f548a45f57d0a27f14841928964c1c1bffd4..9d6c1c63f6d65818e99ca0ba98620bfcc1919577 100644
--- a/test/mjsunit/harmony/symbols.js
+++ b/test/mjsunit/harmony/symbols.js
@@ -232,7 +232,7 @@ function TestKeyHas() {
function TestKeyEnum(obj) {
for (var name in obj) {
- assertTrue(typeof name !== "symbol")
+ assertEquals("string", typeof name)
}
}
@@ -241,19 +241,9 @@ function TestKeyNames(obj) {
assertEquals(0, Object.keys(obj).length)
var names = Object.getOwnPropertyNames(obj)
- assertTrue(symbols.length <= names.length)
- // TODO(rossberg): once we have iterators, the following would be:
- // var expected = new Set(symbols)
- var expected = new Set
- for (var i = 0; i < symbols.length; ++i) expected.add(symbols[i])
- for (var i = 0; i < names.length; ++i) {
- var name = names[i]
- if (typeof name === 'symbol') {
- assertTrue(expected.has(name))
- expected.delete(name)
- }
+ for (var i in names) {
+ assertEquals("string", typeof names[i])
}
- assertEquals(0, expected.size)
}
« no previous file with comments | « test/mjsunit/harmony/proxies-symbols.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698