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

Unified Diff: test/mjsunit/es6/classes-subclass-builtins.js

Issue 1413723008: Revert of [es6] Fix Function and GeneratorFunction built-ins subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@subclass
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/regress/regress-function-constructor-receiver.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/classes-subclass-builtins.js
diff --git a/test/mjsunit/es6/classes-subclass-builtins.js b/test/mjsunit/es6/classes-subclass-builtins.js
index 4d640a918c442e6569c9c90b23d2682a341758ea..c65818eccaf1e297a25b6ea7fdc60c3011127967 100644
--- a/test/mjsunit/es6/classes-subclass-builtins.js
+++ b/test/mjsunit/es6/classes-subclass-builtins.js
@@ -15,30 +15,6 @@
proto = proto.__proto__;
}
}
-
-
-(function() {
- class A extends Function {
- constructor(...args) {
- assertTrue(%IsConstructCall());
- super(...args);
- this.a = 42;
- }
- }
-
- var o = new A("this.foo = 153;");
- assertTrue(o instanceof Object);
- assertTrue(o instanceof Function);
- assertTrue(o instanceof A);
- assertEquals("function", typeof o);
- checkPrototypeChain(o, [A, Function, Object]);
- assertEquals(42, o.a);
- var oo = new o();
- assertEquals(153, oo.foo);
-
- var o1 = new A("return 312;");
- assertTrue(%HaveSameMap(o, o1));
-})();
(function() {
@@ -314,42 +290,6 @@
var o1 = new A(buffer);
assertTrue(%HaveSameMap(o, o1));
-})();
-
-
-(function() {
- // TODO(ishell): remove once GeneratorFunction is available.
- var GeneratorFunction = (function*() {}).__proto__.constructor;
- class A extends GeneratorFunction {
- constructor(...args) {
- assertTrue(%IsConstructCall());
- super(...args);
- this.a = 42;
- }
- }
- var generator_func = new A("var index = 0; while (index < 5) { yield ++index; }");
- assertTrue(generator_func instanceof Object);
- assertTrue(generator_func instanceof Function);
- assertTrue(generator_func instanceof GeneratorFunction);
- assertTrue(generator_func instanceof A);
- assertEquals("function", typeof generator_func);
- checkPrototypeChain(generator_func, [A, GeneratorFunction, Function, Object]);
- assertEquals(42, generator_func.a);
-
- var o = new generator_func();
- assertTrue(o instanceof Object);
- assertTrue(o instanceof generator_func);
- assertEquals("object", typeof o);
-
- assertPropertiesEqual({done: false, value: 1}, o.next());
- assertPropertiesEqual({done: false, value: 2}, o.next());
- assertPropertiesEqual({done: false, value: 3}, o.next());
- assertPropertiesEqual({done: false, value: 4}, o.next());
- assertPropertiesEqual({done: false, value: 5}, o.next());
- assertPropertiesEqual({done: true, value: undefined}, o.next());
-
- var generator_func1 = new A("return 0;");
- assertTrue(%HaveSameMap(generator_func, generator_func1));
})();
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/regress/regress-function-constructor-receiver.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698