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

Unified Diff: test/mjsunit/builtins.js

Issue 427723002: Enable ES6 Map and Set by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove old test, fix BUILD.gn 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-ordered-hash-table.cc ('k') | test/mjsunit/debug-script.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/builtins.js
diff --git a/test/mjsunit/builtins.js b/test/mjsunit/builtins.js
index ce2c6802f0716b4f1f57ccfb4fc3a8aa3c32aca9..3c92af82509b34b2fa2502d6174c61efd5ba5d75 100644
--- a/test/mjsunit/builtins.js
+++ b/test/mjsunit/builtins.js
@@ -38,6 +38,12 @@ function isFunction(obj) {
return typeof obj == "function";
}
+function isV8Native(name) {
+ return name == "GeneratorFunctionPrototype" ||
+ name == "SetIterator" ||
+ name == "MapIterator";
+}
+
function checkConstructor(func, name) {
// A constructor is a function with a prototype and properties on the
// prototype object besides "constructor";
@@ -54,12 +60,13 @@ function checkConstructor(func, name) {
assertFalse(proto_desc.writable, name);
assertFalse(proto_desc.configurable, name);
var prototype = proto_desc.value;
- assertEquals(name == "GeneratorFunctionPrototype" ? Object.prototype : null,
+ assertEquals(isV8Native(name) ? Object.prototype : null,
Object.getPrototypeOf(prototype),
name);
for (var i = 0; i < propNames.length; i++) {
var propName = propNames[i];
if (propName == "constructor") continue;
+ if (isV8Native(name)) continue;
var testName = name + "-" + propName;
var propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
assertTrue(propDesc.hasOwnProperty("value"), testName);
« no previous file with comments | « test/cctest/test-ordered-hash-table.cc ('k') | test/mjsunit/debug-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698