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

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

Issue 1500543002: [es6] Unify ArrayBuffer and SharedArrayBuffer constructors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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: --allow-natives-syntax --harmony-reflect --harmony-regexp-subclass 5 // Flags: --allow-natives-syntax --harmony-reflect --harmony-regexp-subclass
6 // Flags: --expose-gc 6 // Flags: --expose-gc
7 7
8 "use strict"; 8 "use strict";
9 9
10 10
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 assertTrue(o instanceof ArrayBuffer); 429 assertTrue(o instanceof ArrayBuffer);
430 assertTrue(o instanceof A); 430 assertTrue(o instanceof A);
431 assertEquals("object", typeof o); 431 assertEquals("object", typeof o);
432 checkPrototypeChain(o, [A, ArrayBuffer, Object]); 432 checkPrototypeChain(o, [A, ArrayBuffer, Object]);
433 433
434 assertEquals(16, o.byteLength); 434 assertEquals(16, o.byteLength);
435 assertEquals(42, o.a); 435 assertEquals(42, o.a);
436 assertEquals(4.2, o.d); 436 assertEquals(4.2, o.d);
437 assertEquals(153, o.o.foo); 437 assertEquals(153, o.o.foo);
438 438
439 var o1 = new A("bar"); 439 var o1 = new A(8);
440 assertTrue(%HaveSameMap(o, o1)); 440 assertTrue(%HaveSameMap(o, o1));
441 441
442 442
443 class MyInt32Array extends Int32Array { 443 class MyInt32Array extends Int32Array {
444 constructor(v, name) { 444 constructor(v, name) {
445 super(v); 445 super(v);
446 this.name = name; 446 this.name = name;
447 } 447 }
448 } 448 }
449 449
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 821
822 Object.defineProperty(pattern, Symbol.match, { 822 Object.defineProperty(pattern, Symbol.match, {
823 get() { log.push("match"); f.prototype = p2; return false; }}); 823 get() { log.push("match"); f.prototype = p2; return false; }});
824 824
825 var o = Reflect.construct(RegExp, [pattern], f); 825 var o = Reflect.construct(RegExp, [pattern], f);
826 assertEquals(["match", "tostring"], log); 826 assertEquals(["match", "tostring"], log);
827 assertEquals(/biep/, o); 827 assertEquals(/biep/, o);
828 assertTrue(o.__proto__ === p2); 828 assertTrue(o.__proto__ === p2);
829 assertTrue(f.prototype === p3); 829 assertTrue(f.prototype === p3);
830 })(); 830 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698