OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 var datePrototypeFunctions = [ | 58 var datePrototypeFunctions = [ |
59 "toString", "toDateString", "toTimeString", "toLocaleString", | 59 "toString", "toDateString", "toTimeString", "toLocaleString", |
60 "toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime", | 60 "toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime", |
61 "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", | 61 "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", |
62 "getDate", "getUTCDate", "getDay", "getUTCDay", "getHours", | 62 "getDate", "getUTCDate", "getDay", "getUTCDay", "getHours", |
63 "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds", | 63 "getUTCHours", "getMinutes", "getUTCMinutes", "getSeconds", |
64 "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", | 64 "getUTCSeconds", "getMilliseconds", "getUTCMilliseconds", |
65 "getTimezoneOffset", "setTime", "setMilliseconds", | 65 "getTimezoneOffset", "setTime", "setMilliseconds", |
66 "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", | 66 "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", |
67 "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", | 67 "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", |
68 "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toGMTString", | 68 "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", |
69 "toUTCString", "getYear", "setYear"]; | 69 "toUTCString", "getYear", "setYear"]; |
70 | 70 |
71 TestFunctionNames(Date.prototype, datePrototypeFunctions); | 71 TestFunctionNames(Date.prototype, datePrototypeFunctions); |
| 72 assertEquals(Date.prototype.toGMTString, Date.prototype.toUTCString); |
72 | 73 |
73 | 74 |
74 // Function.prototype functions. | 75 // Function.prototype functions. |
75 var functionPrototypeFunctions = [ "toString", "apply", "call" ]; | 76 var functionPrototypeFunctions = [ "toString", "apply", "call" ]; |
76 | 77 |
77 TestFunctionNames(Function.prototype, functionPrototypeFunctions); | 78 TestFunctionNames(Function.prototype, functionPrototypeFunctions); |
78 | 79 |
79 // Math functions. | 80 // Math functions. |
80 var mathFunctions = [ | 81 var mathFunctions = [ |
81 "random", "abs", "acos", "asin", "atan", "ceil", "cos", "exp", "floor", | 82 "random", "abs", "acos", "asin", "atan", "ceil", "cos", "exp", "floor", |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 125 |
125 // Global functions. | 126 // Global functions. |
126 var globalFunctions = [ | 127 var globalFunctions = [ |
127 "escape", "unescape", "decodeURI", "decodeURIComponent", | 128 "escape", "unescape", "decodeURI", "decodeURIComponent", |
128 "encodeURI", "encodeURIComponent", "Error", "TypeError", | 129 "encodeURI", "encodeURIComponent", "Error", "TypeError", |
129 "RangeError", "SyntaxError", "ReferenceError", "EvalError", | 130 "RangeError", "SyntaxError", "ReferenceError", "EvalError", |
130 "URIError", "isNaN", "isFinite", "parseInt", "parseFloat", | 131 "URIError", "isNaN", "isFinite", "parseInt", "parseFloat", |
131 "eval"]; | 132 "eval"]; |
132 | 133 |
133 TestFunctionNames(this, globalFunctions); | 134 TestFunctionNames(this, globalFunctions); |
OLD | NEW |