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

Side by Side Diff: test/mjsunit/get-prototype-of.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 for (var f of errorFunctions) { 71 for (var f of errorFunctions) {
72 assertPrototypeOf(f, Error); 72 assertPrototypeOf(f, Error);
73 assertPrototypeOf(new f(), f.prototype); 73 assertPrototypeOf(new f(), f.prototype);
74 } 74 }
75 75
76 76
77 // Builtin constructors. 77 // Builtin constructors.
78 var functions = [ 78 var functions = [
79 Array, 79 Array,
80 ArrayBuffer,
81 Boolean, 80 Boolean,
82 // DataView, 81 // DataView,
83 Date, 82 Date,
84 Error, 83 Error,
85 Float32Array, 84 Float32Array,
86 Float64Array, 85 Float64Array,
87 Function, 86 Function,
88 Int16Array, 87 Int16Array,
89 Int32Array, 88 Int32Array,
90 Int8Array, 89 Int8Array,
(...skipping 14 matching lines...) Expand all
105 ]; 104 ];
106 105
107 for (var f of functions) { 106 for (var f of functions) {
108 assertPrototypeOf(f, Function.prototype); 107 assertPrototypeOf(f, Function.prototype);
109 assertPrototypeOf(new f(), f.prototype); 108 assertPrototypeOf(new f(), f.prototype);
110 } 109 }
111 110
112 var p = new Promise(function() {}); 111 var p = new Promise(function() {});
113 assertPrototypeOf(p, Promise.prototype); 112 assertPrototypeOf(p, Promise.prototype);
114 113
115 var dv = new DataView(new ArrayBuffer()); 114 var ab = new ArrayBuffer(0);
115 assertPrototypeOf(ab, ArrayBuffer.prototype);
116
117 var dv = new DataView(ab);
116 assertPrototypeOf(dv, DataView.prototype); 118 assertPrototypeOf(dv, DataView.prototype);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698