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

Side by Side Diff: LayoutTests/fast/js/array-functions-non-arrays-expected.txt

Issue 20867002: Remove old tests that have been migrated to the v8 repo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unused script-tests as well Created 7 years, 5 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
(Empty)
1 Test some array functions on non-array objects.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 PASS properties(['b', 'a']) is '0:b, 1:a, length:2(DontDelete, DontEnum)'
7 PASS properties({ length:2, 0:'b', 1:'a' }) is '0:b, 1:a, length:2'
8 PASS properties(new OneItemConstructor) is '0:a(FromPrototype), length:1(FromPro totype)'
9 PASS properties(new TwoItemConstructor) is '0:b(FromPrototype), 1:a(FromPrototyp e), length:2(FromPrototype)'
10 PASS Array.prototype.toString.call({}) is "[object Object]"
11 PASS Array.prototype.toString.call(new Date) is "[object Date]"
12 PASS Array.prototype.toString.call({sort: function() { return 'sort' }}) is "[ob ject Object]"
13 PASS Array.prototype.toString.call({join: function() { return 'join' }}) is "joi n"
14 PASS Array.prototype.toString.call({__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length: 3}) is "a,b,c"
15 PASS ({__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length: 3}).toString( ) is "a,b,c"
16 PASS Array.prototype.toString.call({__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length: 3, join: function() { return 'join' }}) is "join"
17 PASS ({__proto__: Array.prototype, 0: 'a', 1: 'b', 2: 'c', length: 3, join: func tion() { return 'join' }}).toString() is "join"
18 PASS Array.prototype.toString.call(42) is "Number.prototype.join:42"
19 PASS [0, 1, 2].toString() is "array-join"
20 FAIL Array.prototype.toLocaleString.call({}) should throw an exception. Was .
21 PASS Array.prototype.concat.call(x = { length:2, 0:'b', 1:'a' }) is [x]
22 PASS Array.prototype.join.call({}) is ''
23 PASS Array.prototype.join.call(['b', 'a']) is 'b,a'
24 PASS Array.prototype.join.call({ length:2, 0:'b', 1:'a' }) is 'b,a'
25 PASS Array.prototype.join.call(new TwoItemConstructor) is 'b,a'
26 PASS Array.prototype.pop.call({}) is undefined
27 PASS Array.prototype.pop.call({ length:2, 0:'b', 1:'a' }) is 'a'
28 PASS Array.prototype.pop.call({ length:2, 0:'b', 1:'a' }) is 'a'
29 PASS Array.prototype.pop.call(new TwoItemConstructor) is 'a'
30 PASS Array.prototype.pop.call(x = {}); properties(x) is 'length:0'
31 PASS Array.prototype.pop.call(x = ['b', 'a']); properties(x) is '0:b, length:1(D ontDelete, DontEnum)'
32 PASS Array.prototype.pop.call(x = { length:2, 0:'b', 1:'a' }); properties(x) is '0:b, length:1'
33 PASS Array.prototype.pop.call(x = new TwoItemConstructor); properties(x) is '0:b (FromPrototype), 1:a(FromPrototype), length:1'
34 PASS Array.prototype.push.call({}) is 0
35 PASS Array.prototype.push.call(['b', 'a']) is 2
36 PASS Array.prototype.push.call({ length:2, 0:'b', 1:'a' }) is 2
37 PASS Array.prototype.push.call(new TwoItemConstructor) is 2
38 PASS Array.prototype.push.call(x = {}); properties(x) is 'length:0'
39 PASS Array.prototype.push.call(x = ['b', 'a']); properties(x) is '0:b, 1:a, leng th:2(DontDelete, DontEnum)'
40 PASS Array.prototype.push.call(x = { length:2, 0:'b', 1:'a' }); properties(x) is '0:b, 1:a, length:2'
41 PASS Array.prototype.push.call(x = new TwoItemConstructor); properties(x) is '0: b(FromPrototype), 1:a(FromPrototype), length:2'
42 PASS Array.prototype.push.call({}, 'c') is 1
43 PASS Array.prototype.push.call(['b', 'a'], 'c') is 3
44 PASS Array.prototype.push.call({ length:2, 0:'b', 1:'a' }, 'c') is 3
45 PASS Array.prototype.push.call(new TwoItemConstructor, 'c') is 3
46 PASS Array.prototype.push.call(x = {}, 'c'); properties(x) is '0:c, length:1'
47 PASS Array.prototype.push.call(x = ['b', 'a'], 'c'); properties(x) is '0:b, 1:a, 2:c, length:3(DontDelete, DontEnum)'
48 PASS Array.prototype.push.call(x = { length:2, 0:'b', 1:'a' }, 'c'); properties( x) is '0:b, 1:a, 2:c, length:3'
49 PASS Array.prototype.push.call(x = new TwoItemConstructor, 'c'); properties(x) i s '0:b(FromPrototype), 1:a(FromPrototype), 2:c, length:3'
50 PASS properties(Array.prototype.reverse.call({})) is ''
51 PASS properties(Array.prototype.reverse.call(['b', 'a'])) is '0:a, 1:b, length:2 (DontDelete, DontEnum)'
52 PASS properties(Array.prototype.reverse.call({ length:2, 0:'b', 1:'a' })) is '0: a, 1:b, length:2'
53 PASS properties(Array.prototype.reverse.call(new OneItemConstructor)) is '0:a(Fr omPrototype), length:1(FromPrototype)'
54 PASS properties(Array.prototype.reverse.call(new TwoItemConstructor)) is '0:a, 1 :b, length:2(FromPrototype)'
55 PASS Array.prototype.shift.call({}) is undefined
56 PASS Array.prototype.shift.call(['b', 'a']) is 'b'
57 PASS Array.prototype.shift.call({ length:2, 0:'b', 1:'a' }) is 'b'
58 PASS Array.prototype.shift.call(new TwoItemConstructor) is 'b'
59 PASS Array.prototype.shift.call(x = {}); properties(x) is 'length:0'
60 PASS Array.prototype.shift.call(x = ['b', 'a']); properties(x) is '0:a, length:1 (DontDelete, DontEnum)'
61 PASS Array.prototype.shift.call(x = { length:2, 0:'b', 1:'a' }); properties(x) i s '0:a, length:1'
62 PASS Array.prototype.shift.call(x = new TwoItemConstructor); properties(x) is '0 :a, 1:a(FromPrototype), length:1'
63 PASS Array.prototype.slice.call({}, 0, 1) is []
64 PASS Array.prototype.slice.call(['b', 'a'], 0, 1) is ['b']
65 PASS Array.prototype.slice.call({ length:2, 0:'b', 1:'a' }, 0, 1) is ['b']
66 PASS Array.prototype.slice.call(new TwoItemConstructor, 0, 1) is ['b']
67 PASS properties(Array.prototype.sort.call({})) is ''
68 PASS properties(Array.prototype.sort.call(['b', 'a'])) is '0:a, 1:b, length:2(Do ntDelete, DontEnum)'
69 PASS properties(Array.prototype.sort.call({ length:2, 0:'b', 1:'a' })) is '0:a, 1:b, length:2'
70 PASS properties(Array.prototype.sort.call(new OneItemConstructor)) is '0:a(FromP rototype), length:1(FromPrototype)'
71 PASS properties(Array.prototype.sort.call(new TwoItemConstructor)) is '0:a, 1:b, length:2(FromPrototype)'
72 PASS Array.prototype.splice.call({}, 0, 1) is []
73 PASS Array.prototype.splice.call(['b', 'a'], 0, 1) is ['b']
74 PASS Array.prototype.splice.call({ length:2, 0:'b', 1:'a' }, 0, 1) is ['b']
75 PASS Array.prototype.splice.call(new TwoItemConstructor, 0, 1) is ['b']
76 PASS Array.prototype.splice.call(x = {}, 0, 1); properties(x) is 'length:0'
77 PASS Array.prototype.splice.call(x = ['b', 'a'], 0, 1); properties(x) is '0:a, l ength:1(DontDelete, DontEnum)'
78 PASS Array.prototype.splice.call(x = { length:2, 0:'b', 1:'a' }, 0, 1); properti es(x) is '0:a, length:1'
79 PASS Array.prototype.splice.call(x = new TwoItemConstructor, 0, 1); properties(x ) is '0:a, 1:a(FromPrototype), length:1'
80 PASS Array.prototype.unshift.call({}) is 0
81 PASS Array.prototype.unshift.call(['b', 'a']) is 2
82 PASS Array.prototype.unshift.call({ length:2, 0:'b', 1:'a' }) is 2
83 PASS Array.prototype.unshift.call(new TwoItemConstructor) is 2
84 PASS Array.prototype.unshift.call(x = {}); properties(x) is 'length:0'
85 PASS Array.prototype.unshift.call(x = ['b', 'a']); properties(x) is '0:b, 1:a, l ength:2(DontDelete, DontEnum)'
86 PASS Array.prototype.unshift.call(x = { length:2, 0:'b', 1:'a' }); properties(x) is '0:b, 1:a, length:2'
87 PASS Array.prototype.unshift.call(x = new TwoItemConstructor); properties(x) is '0:b(FromPrototype), 1:a(FromPrototype), length:2'
88 PASS Array.prototype.unshift.call({}, 'c') is 1
89 PASS Array.prototype.unshift.call(['b', 'a'], 'c') is 3
90 PASS Array.prototype.unshift.call({ length:2, 0:'b', 1:'a' }, 'c') is 3
91 PASS Array.prototype.unshift.call(new TwoItemConstructor, 'c') is 3
92 PASS Array.prototype.unshift.call(x = {}, 'c'); properties(x) is '0:c, length:1'
93 PASS Array.prototype.unshift.call(x = ['b', 'a'], 'c'); properties(x) is '0:c, 1 :b, 2:a, length:3(DontDelete, DontEnum)'
94 PASS Array.prototype.unshift.call(x = { length:2, 0:'b', 1:'a' }, 'c'); properti es(x) is '0:c, 1:b, 2:a, length:3'
95 PASS Array.prototype.unshift.call(x = new TwoItemConstructor, 'c'); properties(x ) is '0:c, 1:b, 2:a, length:3'
96 PASS successfullyParsed is true
97
98 TEST COMPLETE
99
OLDNEW
« no previous file with comments | « LayoutTests/fast/js/array-functions-non-arrays.html ('k') | LayoutTests/fast/js/array-prototype-properties.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698