| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright 2014 the V8 project authors. All rights reserved. | 
|  | 2 // Use of this source code is governed by a BSD-style license that can be | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 // Based on: https://hg.mozilla.org/mozilla-central/file/d0c3168c3c47/js/src/jit
    -test/tests/collections/Array-of-surfaces.js | 
|  | 6 | 
|  | 7 // Flags: --harmony-arrays | 
|  | 8 | 
|  | 9 | 
|  | 10 // Check superficial features of Array.of. | 
|  | 11 | 
|  | 12 var desc = Object.getOwnPropertyDescriptor(Array, "of"); | 
|  | 13 | 
|  | 14 assertEquals(desc.configurable, true); | 
|  | 15 assertEquals(desc.enumerable, false); | 
|  | 16 assertEquals(desc.writable, true); | 
|  | 17 assertEquals(Array.of.length, 0); | 
|  | 18 assertThrows(function() { new Array.of() }, TypeError);  // not a constructor | 
|  | 19 | 
|  | 20 // When the this-value passed in is not a constructor, the result is an array. | 
|  | 21 [undefined, null, false, "cow"].forEach(function(val) { | 
|  | 22     assertEquals(Array.isArray(Array.of(val)), true); | 
|  | 23 }); | 
| OLD | NEW | 
|---|