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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/files/file-constructor-expected.txt

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 years, 8 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
OLDNEW
1 Test the File constructor. 1 Test the File constructor.
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 PASS (new File([], 'world.html')) instanceof window.File is true 6 PASS (new File([], 'world.html')) instanceof window.File is true
7 PASS (new File(['hello'], 'world.html')) instanceof window.File is true 7 PASS (new File(['hello'], 'world.html')) instanceof window.File is true
8 PASS (new File(['hello'], 'world.html', {})) instanceof window.File is true 8 PASS (new File(['hello'], 'world.html', {})) instanceof window.File is true
9 PASS (new File(['hello'], 'world.html', {type:'text/html'})) instanceof window.F ile is true 9 PASS (new File(['hello'], 'world.html', {type:'text/html'})) instanceof window.F ile is true
10 PASS (new File(['hello'], 'world.html', {type:'text/html', endings:'native'})) i nstanceof window.File is true 10 PASS (new File(['hello'], 'world.html', {type:'text/html', endings:'native'})) i nstanceof window.File is true
11 PASS (new File(['hello'], 'world.html', {type:'text/html', endings:'transparent' })) instanceof window.File is true 11 PASS (new File(['hello'], 'world.html', {type:'text/html', endings:'transparent' })) instanceof window.File is true
12 PASS (new File([], 'world.html')) instanceof window.File is true 12 PASS (new File([], 'world.html')) instanceof window.File is true
13 PASS (new File()) threw exception TypeError: Failed to construct 'File': 2 argum ents required, but only 0 present.. 13 PASS (new File()) threw exception TypeError: Failed to construct 'File': 2 argum ents required, but only 0 present..
14 PASS (new File([])) threw exception TypeError: Failed to construct 'File': 2 arg uments required, but only 1 present.. 14 PASS (new File([])) threw exception TypeError: Failed to construct 'File': 2 arg uments required, but only 1 present..
15 PASS (new File([], null)) instanceof window.File is true 15 PASS (new File([], null)) instanceof window.File is true
16 PASS (new File([], 1)) instanceof window.File is true 16 PASS (new File([], 1)) instanceof window.File is true
17 PASS (new File([], '')) instanceof window.File is true 17 PASS (new File([], '')) instanceof window.File is true
18 PASS (new File([], document)) instanceof window.File is true 18 PASS (new File([], document)) instanceof window.File is true
19 PASS new File('hello', 'world.html') threw exception TypeError: Failed to constr uct 'File': The 1st argument is neither an array, nor does it have indexed prope rties.. 19 PASS new File('hello', 'world.html') threw exception TypeError: Failed to constr uct 'File': The provided value cannot be converted to a sequence..
20 PASS new File(0, 'world.html') threw exception TypeError: Failed to construct 'F ile': The 1st argument is neither an array, nor does it have indexed properties. . 20 PASS new File(0, 'world.html') threw exception TypeError: Failed to construct 'F ile': The provided value cannot be converted to a sequence..
21 PASS new File(null, 'world.html') threw exception TypeError: Failed to construct 'File': The 1st argument is neither an array, nor does it have indexed properti es.. 21 PASS new File(null, 'world.html') threw exception TypeError: Failed to construct 'File': The provided value cannot be converted to a sequence..
22 PASS (new File([], 'world.html')) instanceof window.File is true 22 PASS (new File([], 'world.html')) instanceof window.File is true
23 PASS (new File(['stringPrimitive'], 'world.html')) instanceof window.File is tru e 23 PASS (new File(['stringPrimitive'], 'world.html')) instanceof window.File is tru e
24 PASS (new File([String('stringObject')], 'world.html')) instanceof window.File i s true 24 PASS (new File([String('stringObject')], 'world.html')) instanceof window.File i s true
25 PASS (new File([new Blob], 'world.html')) instanceof window.File is true 25 PASS (new File([new Blob], 'world.html')) instanceof window.File is true
26 PASS (new File([new Blob([new Blob])], 'world.html')) instanceof window.File is true 26 PASS (new File([new Blob([new Blob])], 'world.html')) instanceof window.File is true
27 PASS (new Blob([new File([], 'world.txt')])) instanceof window.Blob is true 27 PASS (new Blob([new File([], 'world.txt')])) instanceof window.Blob is true
28 PASS (new Blob([new Blob([new File([new Blob], 'world.txt')])])) instanceof wind ow.Blob is true 28 PASS (new Blob([new Blob([new File([new Blob], 'world.txt')])])) instanceof wind ow.Blob is true
29 PASS (new File([new File([], 'world.txt')], 'world.html')) instanceof window.Fil e is true 29 PASS (new File([new File([], 'world.txt')], 'world.html')) instanceof window.Fil e is true
30 PASS (new File([new Blob([new File([new Blob], 'world.txt')])], 'world.html')) i nstanceof window.File is true 30 PASS (new File([new Blob([new File([new Blob], 'world.txt')])], 'world.html')) i nstanceof window.File is true
31 PASS (new File([12], 'world.html')).size is 2 31 PASS (new File([12], 'world.html')).size is 2
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 PASS new File([(new Int8Array(100)).buffer], 'world.html').size is 100 92 PASS new File([(new Int8Array(100)).buffer], 'world.html').size is 100
93 PASS new File([(new Int16Array(100)).buffer], 'world.html').size is 200 93 PASS new File([(new Int16Array(100)).buffer], 'world.html').size is 200
94 PASS new File([(new Int32Array(100)).buffer], 'world.html').size is 400 94 PASS new File([(new Int32Array(100)).buffer], 'world.html').size is 400
95 PASS new File([(new Float32Array(100)).buffer], 'world.html').size is 400 95 PASS new File([(new Float32Array(100)).buffer], 'world.html').size is 400
96 PASS new File([(new Float64Array(100)).buffer], 'world.html').size is 800 96 PASS new File([(new Float64Array(100)).buffer], 'world.html').size is 800
97 PASS new File([(new Float64Array(100)).buffer, (new Int32Array(100)).buffer, (ne w Uint8Array(100)).buffer, (new DataView(new ArrayBuffer(100))).buffer], 'world. html').size is 1400 97 PASS new File([(new Float64Array(100)).buffer, (new Int32Array(100)).buffer, (ne w Uint8Array(100)).buffer, (new DataView(new ArrayBuffer(100))).buffer], 'world. html').size is 1400
98 PASS new File([new Blob([(new Int32Array(100)).buffer]), (new Uint8Array(100)).b uffer, (new Float32Array(100)).buffer, (new DataView(new ArrayBuffer(100))).buff er], 'world.html').size is 1000 98 PASS new File([new Blob([(new Int32Array(100)).buffer]), (new Uint8Array(100)).b uffer, (new Float32Array(100)).buffer, (new DataView(new ArrayBuffer(100))).buff er], 'world.html').size is 1000
99 PASS new File([new Blob([(new Int32Array(100)).buffer]), new File([new Uint16Arr ay(100).buffer], 'world.txt'), (new Uint8Array(100)).buffer, (new Float32Array(1 00)).buffer, (new DataView(new ArrayBuffer(100))).buffer], 'world.html').size is 1200 99 PASS new File([new Blob([(new Int32Array(100)).buffer]), new File([new Uint16Arr ay(100).buffer], 'world.txt'), (new Uint8Array(100)).buffer, (new Float32Array(1 00)).buffer, (new DataView(new ArrayBuffer(100))).buffer], 'world.html').size is 1200
100 PASS new Blob([new Blob([new Int32Array(100)]), new File([new Uint16Array(100)], 'world.txt'), new Uint8Array(100), new Float32Array(100), new DataView(new Arra yBuffer(100))]).size is 1200 100 PASS new Blob([new Blob([new Int32Array(100)]), new File([new Uint16Array(100)], 'world.txt'), new Uint8Array(100), new Float32Array(100), new DataView(new Arra yBuffer(100))]).size is 1200
101 PASS new Blob([new Blob([(new Int32Array(100)).buffer]), new File([new Uint16Arr ay(100).buffer], 'world.txt'), (new Uint8Array(100)).buffer, (new Float32Array(1 00)).buffer, (new DataView(new ArrayBuffer(100))).buffer]).size is 1200 101 PASS new Blob([new Blob([(new Int32Array(100)).buffer]), new File([new Uint16Arr ay(100).buffer], 'world.txt'), (new Uint8Array(100)).buffer, (new Float32Array(1 00)).buffer, (new DataView(new ArrayBuffer(100))).buffer]).size is 1200
102 PASS new File({length: 0}, 'world.txt').size is 0 102 PASS new File(createIterable([{done:true}]), 'world.txt').size is 0
103 PASS new File({length: 1, 0: 'string'}, 'world.txt').size is 6 103 PASS new File(createIterable([{done:false, value:'string'},{done:true}]), 'world .txt').size is 6
104 PASS successfullyParsed is true 104 PASS successfullyParsed is true
105 105
106 TEST COMPLETE 106 TEST COMPLETE
107 107
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698