19258b6bc66e09368ada54001f619d53b4fc976d5ager@chromium.org// Copyright 2008 the V8 project authors. All rights reserved. 29a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// Redistribution and use in source and binary forms, with or without 39a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// modification, are permitted provided that the following conditions are 49a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// met: 59a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 69a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// * Redistributions of source code must retain the above copyright 79a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// notice, this list of conditions and the following disclaimer. 89a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// * Redistributions in binary form must reproduce the above 99a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// copyright notice, this list of conditions and the following 109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// disclaimer in the documentation and/or other materials provided 119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// with the distribution. 129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// * Neither the name of Google Inc. nor the names of its 139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// contributors may be used to endorse or promote products derived 149a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// from this software without specific prior written permission. 159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 219a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 239a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 249a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com/** 299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com * @fileoverview Assert we match ES3 and Safari. 309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com */ 319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(0, Array.prototype.length, "Array.prototype.length"); 339a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Array.length, "Array.length"); 349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Array.prototype.concat.length, "Array.prototype.concat.length"); 359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Array.prototype.join.length, "Array.prototype.join.length"); 369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Array.prototype.push.length, "Array.prototype.push.length"); 379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Array.prototype.unshift.length, "Array.prototype.unshift.length"); 389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Boolean.length, "Boolean.length"); 399a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Error.length, "Error.length"); 409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, EvalError.length, "EvalError.length"); 419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Function.length, "Function.length"); 429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Function.prototype.call.length, "Function.prototype.call.length"); 439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Number.length, "Number.length"); 449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Number.prototype.toExponential.length, "Number.prototype.toExponential.length"); 459a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Number.prototype.toFixed.length, "Number.prototype.toFixed.length"); 469a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Number.prototype.toPrecision.length, "Number.prototype.toPrecision.length"); 479a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, Object.length, "Object.length"); 489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, RangeError.length, "RangeError.length"); 499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, ReferenceError.length, "ReferenceError.length"); 509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, String.fromCharCode.length, "String.fromCharCode.length"); 519a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, String.length, "String.length"); 529a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, String.prototype.concat.length, "String.prototype.concat.length"); 539a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, String.prototype.indexOf.length, "String.prototype.indexOf.length"); 549a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, String.prototype.lastIndexOf.length, "String.prototype.lastIndexOf.length"); 559a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, SyntaxError.length, "SyntaxError.length"); 569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(1, TypeError.length, "TypeError.length"); 579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Array.prototype.slice.length, "Array.prototype.slice.length"); 589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Array.prototype.splice.length, "Array.prototype.splice.length"); 599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Date.prototype.setMonth.length, "Date.prototype.setMonth.length"); 609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Date.prototype.setSeconds.length, "Date.prototype.setSeconds.length"); 619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Date.prototype.setUTCMonth.length, "Date.prototype.setUTCMonth.length"); 629a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Date.prototype.setUTCSeconds.length, "Date.prototype.setUTCSeconds.length"); 639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Function.prototype.apply.length, "Function.prototype.apply.length"); 649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Math.max.length, "Math.max.length"); 659a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, Math.min.length, "Math.min.length"); 669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, RegExp.length, "RegExp.length"); 679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, String.prototype.slice.length, "String.prototype.slice.length"); 689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, String.prototype.split.length, "String.prototype.split.length"); 699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, String.prototype.substr.length, "String.prototype.substr.length"); 709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(2, String.prototype.substring.length, "String.prototype.substring.length"); 719a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(3, Date.prototype.setFullYear.length, "Date.prototype.setFullYear.length"); 729a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(3, Date.prototype.setMinutes.length, "Date.prototype.setMinutes.length"); 739a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(3, Date.prototype.setUTCFullYear.length, "Date.prototype.setUTCFullYear.length"); 749a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(3, Date.prototype.setUTCMinutes.length, "Date.prototype.setUTCMinutes.length"); 759a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(4, Date.prototype.setHours.length, "Date.prototype.setHours.length"); 769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(4, Date.prototype.setUTCHours.length, "Date.prototype.setUTCHours.length"); 779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(7, Date.UTC.length, "Date.UTC.length"); 789a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comassertEquals(7, Date.length, "Date.length"); 79