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

Side by Side Diff: test/webkit/fast/js/Object-getOwnPropertyNames.js

Issue 439153005: Update webkit test for expected own properties (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 1. Redistributions of source code must retain the above copyright 7 // 1. Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // 2. Redistributions in binary form must reproduce the above copyright 9 // 2. Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the 10 // notice, this list of conditions and the following disclaimer in the
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 "(function(){var x=new Date();x.__proto__=[1,2,3];return x;})()": "[]", 53 "(function(){var x=new Date();x.__proto__=[1,2,3];return x;})()": "[]",
54 // RegExp objects 54 // RegExp objects
55 "new RegExp('foo')": "['global', 'ignoreCase', 'lastIndex', 'multiline', 'so urce']", 55 "new RegExp('foo')": "['global', 'ignoreCase', 'lastIndex', 'multiline', 'so urce']",
56 "(function(){var x=new RegExp();x.__proto__=[1,2,3];return x;})()": "['globa l', 'ignoreCase', 'lastIndex', 'multiline', 'source']", 56 "(function(){var x=new RegExp();x.__proto__=[1,2,3];return x;})()": "['globa l', 'ignoreCase', 'lastIndex', 'multiline', 'source']",
57 // Arguments objects 57 // Arguments objects
58 "argumentsObject()": "['callee', 'length']", 58 "argumentsObject()": "['callee', 'length']",
59 "argumentsObject(1)": "['0', 'callee', 'length']", 59 "argumentsObject(1)": "['0', 'callee', 'length']",
60 "argumentsObject(1,2,3)": "['0', '1', '2', 'callee', 'length']", 60 "argumentsObject(1,2,3)": "['0', '1', '2', 'callee', 'length']",
61 "(function(){arguments.__proto__=[1,2,3];return arguments;})()": "['callee', 'length']", 61 "(function(){arguments.__proto__=[1,2,3];return arguments;})()": "['callee', 'length']",
62 // Built-in ECMA functions 62 // Built-in ECMA functions
63 "parseInt": "['length', 'name']", 63 "parseInt": "['arguments', 'caller', 'length', 'name']",
64 "parseFloat": "['length', 'name']", 64 "parseFloat": "['arguments', 'caller', 'length', 'name']",
65 "isNaN": "['length', 'name']", 65 "isNaN": "['arguments', 'caller', 'length', 'name']",
66 "isFinite": "['length', 'name']", 66 "isFinite": "['arguments', 'caller', 'length', 'name']",
67 "escape": "['length', 'name']", 67 "escape": "['arguments', 'caller', 'length', 'name']",
68 "unescape": "['length', 'name']", 68 "unescape": "['arguments', 'caller', 'length', 'name']",
69 "decodeURI": "['length', 'name']", 69 "decodeURI": "['arguments', 'caller', 'length', 'name']",
70 "decodeURIComponent": "['length', 'name']", 70 "decodeURIComponent": "['arguments', 'caller', 'length', 'name']",
71 "encodeURI": "['length', 'name']", 71 "encodeURI": "['arguments', 'caller', 'length', 'name']",
72 "encodeURIComponent": "['length', 'name']", 72 "encodeURIComponent": "['arguments', 'caller', 'length', 'name']",
73 // Built-in ECMA objects 73 // Built-in ECMA objects
74 "Object": "['create', 'defineProperties', 'defineProperty', 'freeze', 'getOw nPropertyDescriptor', 'getOwnPropertyNames', 'getOwnPropertySymbols', 'getProtot ypeOf', 'isExtensible', 'isFrozen', 'isSealed', 'keys', 'length', 'name', 'preve ntExtensions', 'prototype', 'seal', 'setPrototypeOf']", 74 "Object": "['arguments', 'caller', 'create', 'defineProperties', 'defineProp erty', 'deliverChangeRecords', 'freeze', 'getNotifier', 'getOwnPropertyDescripto r', 'getOwnPropertyNames', 'getOwnPropertySymbols', 'getPrototypeOf', 'is', 'isE xtensible', 'isFrozen', 'isSealed', 'keys', 'length', 'name', 'observe', 'preven tExtensions', 'prototype', 'seal', 'setPrototypeOf', 'unobserve']",
75 "Object.prototype": "['__defineGetter__', '__defineSetter__', '__lookupGette r__', '__lookupSetter__', '__proto__', 'constructor', 'hasOwnProperty', 'isProto typeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf']", 75 "Object.prototype": "['__defineGetter__', '__defineSetter__', '__lookupGette r__', '__lookupSetter__', '__proto__', 'constructor', 'hasOwnProperty', 'isProto typeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf']",
76 "Function": "['length', 'name', 'prototype']", 76 "Function": "['arguments', 'caller', 'length', 'name', 'prototype']",
77 "Function.prototype": "['apply', 'bind', 'call', 'constructor', 'length', 'n ame', 'toString']", 77 "Function.prototype": "['apply', 'arguments', 'bind', 'call', 'caller', 'con structor', 'length', 'name', 'toString']",
78 "Array": "['isArray', 'length', 'name', 'prototype']", 78 "Array": "['arguments', 'caller', 'isArray', 'length', 'name', 'observe', 'p rototype', 'unobserve']",
79 "Array.prototype": "['concat', 'constructor', 'every', 'filter', 'forEach', 'indexOf', 'join', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'red uceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleStrin g', 'toString', 'unshift']", 79 "Array.prototype": "['concat', 'constructor', 'every', 'filter', 'forEach', 'indexOf', 'join', 'lastIndexOf', 'length', 'map', 'pop', 'push', 'reduce', 'red uceRight', 'reverse', 'shift', 'slice', 'some', 'sort', 'splice', 'toLocaleStrin g', 'toString', 'unshift']",
80 "String": "['fromCharCode', 'length', 'name', 'prototype']", 80 "String": "['arguments', 'caller', 'fromCharCode', 'length', 'name', 'protot ype']",
81 "String.prototype": "['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeA t', 'concat', 'constructor', 'fixed', 'fontcolor', 'fontsize', 'indexOf', 'itali cs', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'normalize', 're place', 'search', 'slice', 'small', 'split', 'strike', 'sub', 'substr', 'substri ng', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', 'valueOf']", 81 "String.prototype": "['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeA t', 'concat', 'constructor', 'fixed', 'fontcolor', 'fontsize', 'indexOf', 'itali cs', 'lastIndexOf', 'length', 'link', 'localeCompare', 'match', 'normalize', 're place', 'search', 'slice', 'small', 'split', 'strike', 'sub', 'substr', 'substri ng', 'sup', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toString', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', 'valueOf']",
82 "Boolean": "['length', 'name', 'prototype']", 82 "Boolean": "['arguments', 'caller', 'length', 'name', 'prototype']",
83 "Boolean.prototype": "['constructor', 'toString', 'valueOf']", 83 "Boolean.prototype": "['constructor', 'toString', 'valueOf']",
84 "Number": "['MAX_VALUE', 'MIN_VALUE', 'NEGATIVE_INFINITY', 'NaN', 'POSITIVE_ INFINITY', 'length', 'name', 'prototype']", 84 "Number": "['EPSILON', 'MAX_SAFE_INTEGER', 'MAX_VALUE', 'MIN_SAFE_INTEGER', 'MIN_VALUE', 'NEGATIVE_INFINITY', 'NaN', 'POSITIVE_INFINITY', 'arguments', 'call er', 'isFinite', 'isInteger', 'isNaN', 'isSafeInteger', 'length', 'name', 'parse Float', 'parseInt', 'prototype']",
85 "Number.prototype": "['constructor', 'toExponential', 'toFixed', 'toLocaleSt ring', 'toPrecision', 'toString', 'valueOf']", 85 "Number.prototype": "['constructor', 'toExponential', 'toFixed', 'toLocaleSt ring', 'toPrecision', 'toString', 'valueOf']",
86 "Date": "['UTC', 'length', 'name', 'now', 'parse', 'prototype']", 86 "Date": "['UTC', 'arguments', 'caller', 'length', 'name', 'now', 'parse', 'p rototype']",
87 "Date.prototype": "['constructor', 'getDate', 'getDay', 'getFullYear', 'getH ours', 'getMilliseconds', 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'ge tTimezoneOffset', 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'g etUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', 'setMinutes', 'setMonth ', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', 'setUTCHours', 'setU TCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'to DateString', 'toGMTString', 'toISOString', 'toJSON', 'toLocaleDateString', 'toLo caleString', 'toLocaleTimeString', 'toString', 'toTimeString', 'toUTCString', 'v alueOf']", 87 "Date.prototype": "['constructor', 'getDate', 'getDay', 'getFullYear', 'getH ours', 'getMilliseconds', 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'ge tTimezoneOffset', 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'g etUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', 'setMinutes', 'setMonth ', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', 'setUTCHours', 'setU TCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'to DateString', 'toGMTString', 'toISOString', 'toJSON', 'toLocaleDateString', 'toLo caleString', 'toLocaleTimeString', 'toString', 'toTimeString', 'toUTCString', 'v alueOf']",
88 "RegExp": "['$&', \"$'\", '$*', '$+', '$1', '$2', '$3', '$4', '$5', '$6', '$ 7', '$8', '$9', '$_', '$`', 'input', 'lastMatch', 'lastParen', 'leftContext', 'l ength', 'multiline', 'name', 'prototype', 'rightContext']", 88 "RegExp": "['$&', \"$'\", '$*', '$+', '$1', '$2', '$3', '$4', '$5', '$6', '$ 7', '$8', '$9', '$_', '$`', 'arguments', 'caller', 'input', 'lastMatch', 'lastPa ren', 'leftContext', 'length', 'multiline', 'name', 'prototype', 'rightContext'] ",
89 "RegExp.prototype": "['compile', 'constructor', 'exec', 'global', 'ignoreCas e', 'lastIndex', 'multiline', 'source', 'test', 'toString']", 89 "RegExp.prototype": "['compile', 'constructor', 'exec', 'global', 'ignoreCas e', 'lastIndex', 'multiline', 'source', 'test', 'toString']",
90 "Error": "['length', 'name', 'prototype']", 90 "Error": "['arguments', 'caller', 'captureStackTrace', 'length', 'name', 'pr ototype', 'stackTraceLimit']",
91 "Error.prototype": "['constructor', 'message', 'name', 'toString']", 91 "Error.prototype": "['constructor', 'message', 'name', 'toString']",
92 "Math": "['E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2', ' abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'ma x', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan']", 92 "Math": "['E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2', ' abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'cbrt', 'ceil' , 'clz32', 'cos', 'cosh', 'exp', 'expm1', 'floor', 'fround', 'hypot', 'imul', 'l og', 'log10', 'log1p', 'log2', 'max', 'min', 'pow', 'random', 'round', 'sign', ' sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']",
93 "JSON": "['parse', 'stringify']" 93 "JSON": "['parse', 'stringify']"
94 }; 94 };
95 95
96 function getSortedOwnPropertyNames(obj) 96 function getSortedOwnPropertyNames(obj)
97 { 97 {
98 return Object.getOwnPropertyNames(obj).sort(); 98 return Object.getOwnPropertyNames(obj).sort();
99 } 99 }
100 100
101 for (var expr in expectedPropertyNamesSet) 101 for (var expr in expectedPropertyNamesSet)
102 shouldBe("getSortedOwnPropertyNames(" + expr + ")", expectedPropertyNamesSet [expr]); 102 shouldBe("getSortedOwnPropertyNames(" + expr + ")", expectedPropertyNamesSet [expr]);
(...skipping 23 matching lines...) Expand all
126 "Number", 126 "Number",
127 "Date", 127 "Date",
128 "RegExp", 128 "RegExp",
129 "Error", 129 "Error",
130 "Math", 130 "Math",
131 "JSON" 131 "JSON"
132 ]; 132 ];
133 133
134 for (var i = 0; i < expectedGlobalPropertyNames.length; ++i) 134 for (var i = 0; i < expectedGlobalPropertyNames.length; ++i)
135 shouldBeTrue("globalPropertyNames.indexOf('" + expectedGlobalPropertyNames[i ] + "') != -1"); 135 shouldBeTrue("globalPropertyNames.indexOf('" + expectedGlobalPropertyNames[i ] + "') != -1");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698