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

Side by Side Diff: test/mjsunit/harmony/reflect-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-2015 the V8 project authors. All rights reserved. 1 // Copyright 2010-2015 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 for (var f of errorFunctions) { 94 for (var f of errorFunctions) {
95 assertPrototypeOf(f, Error); 95 assertPrototypeOf(f, Error);
96 assertPrototypeOf(new f(), f.prototype); 96 assertPrototypeOf(new f(), f.prototype);
97 } 97 }
98 98
99 99
100 // Builtin constructors. 100 // Builtin constructors.
101 var functions = [ 101 var functions = [
102 Array, 102 Array,
103 ArrayBuffer,
104 Boolean, 103 Boolean,
105 // DataView, 104 // DataView,
106 Date, 105 Date,
107 Error, 106 Error,
108 Float32Array, 107 Float32Array,
109 Float64Array, 108 Float64Array,
110 Function, 109 Function,
111 Int16Array, 110 Int16Array,
112 Int32Array, 111 Int32Array,
113 Int8Array, 112 Int8Array,
(...skipping 14 matching lines...) Expand all
128 ]; 127 ];
129 128
130 for (var f of functions) { 129 for (var f of functions) {
131 assertPrototypeOf(f, Function.prototype); 130 assertPrototypeOf(f, Function.prototype);
132 assertPrototypeOf(new f(), f.prototype); 131 assertPrototypeOf(new f(), f.prototype);
133 } 132 }
134 133
135 var p = new Promise(function() {}); 134 var p = new Promise(function() {});
136 assertPrototypeOf(p, Promise.prototype); 135 assertPrototypeOf(p, Promise.prototype);
137 136
138 var dv = new DataView(new ArrayBuffer()); 137 var ab = new ArrayBuffer(0);
138 assertPrototypeOf(ab, ArrayBuffer.prototype);
139
140 var dv = new DataView(ab);
139 assertPrototypeOf(dv, DataView.prototype); 141 assertPrototypeOf(dv, DataView.prototype);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698