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

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

Issue 74213009: File constructor understands lastModified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
(...skipping 27 matching lines...) Expand all
38 PASS (new File([], '')).name is '' 38 PASS (new File([], '')).name is ''
39 PASS (new File([], {})).name is '[object Object]' 39 PASS (new File([], {})).name is '[object Object]'
40 PASS (new File([], document)).name is '[object HTMLDocument]' 40 PASS (new File([], document)).name is '[object HTMLDocument]'
41 PASS (new File([], toStringingObj)).name is 'A string' 41 PASS (new File([], toStringingObj)).name is 'A string'
42 PASS (new File([], throwingObj)).name threw exception Error. 42 PASS (new File([], throwingObj)).name threw exception Error.
43 PASS (new File([], 'world.html', {unknownKey:'value'})) instanceof window.File i s true 43 PASS (new File([], 'world.html', {unknownKey:'value'})) instanceof window.File i s true
44 PASS new File([], 'world.html', {endings:'illegalValue'}) threw exception TypeEr ror: Failed to construct 'File': The "endings" property must be either "transpar ent" or "native".. 44 PASS new File([], 'world.html', {endings:'illegalValue'}) threw exception TypeEr ror: Failed to construct 'File': The "endings" property must be either "transpar ent" or "native"..
45 PASS new File([], 'world.html', {endings:throwingObj}) threw exception Error. 45 PASS new File([], 'world.html', {endings:throwingObj}) threw exception Error.
46 PASS new File([], 'world.html', {type:throwingObj}) threw exception Error. 46 PASS new File([], 'world.html', {type:throwingObj}) threw exception Error.
47 PASS new File([], 'world.html', {type:'helloĆ®'}) threw exception SyntaxError: Fa iled to construct 'File': The "type" property must consist of ASCII characters.. 47 PASS new File([], 'world.html', {type:'helloĆ®'}) threw exception SyntaxError: Fa iled to construct 'File': The "type" property must consist of ASCII characters..
48 PASS new File([], 'world.html', {lastModifiedDate: 'not a date'}) threw exceptio n SyntaxError: Failed to construct 'File': The "lastModifiedDate" property must be a Date instance..
49 PASS new File([], 'world.html', {lastModifiedDate: null}) threw exception Syntax Error: Failed to construct 'File': The "lastModifiedDate" property must be a Dat e instance..
48 PASS (new File([], 'world.html', null)) instanceof window.File threw exception T ypeError: Failed to construct 'File': The 3rd argument is not of type Object.. 50 PASS (new File([], 'world.html', null)) instanceof window.File threw exception T ypeError: Failed to construct 'File': The 3rd argument is not of type Object..
49 PASS (new File([], 'world.html', undefined)) instanceof window.File threw except ion TypeError: Failed to construct 'File': The 3rd argument is not of type Objec t.. 51 PASS (new File([], 'world.html', undefined)) instanceof window.File threw except ion TypeError: Failed to construct 'File': The 3rd argument is not of type Objec t..
50 PASS (new File([], 'world.html', 123)) instanceof window.File threw exception Ty peError: Failed to construct 'File': The 3rd argument is not of type Object.. 52 PASS (new File([], 'world.html', 123)) instanceof window.File threw exception Ty peError: Failed to construct 'File': The 3rd argument is not of type Object..
51 PASS (new File([], 'world.html', 123.4)) instanceof window.File threw exception TypeError: Failed to construct 'File': The 3rd argument is not of type Object.. 53 PASS (new File([], 'world.html', 123.4)) instanceof window.File threw exception TypeError: Failed to construct 'File': The 3rd argument is not of type Object..
52 PASS (new File([], 'world.html', true)) instanceof window.File threw exception T ypeError: Failed to construct 'File': The 3rd argument is not of type Object.. 54 PASS (new File([], 'world.html', true)) instanceof window.File threw exception T ypeError: Failed to construct 'File': The 3rd argument is not of type Object..
53 PASS (new File([], 'world.html', 'abc')) instanceof window.File threw exception TypeError: Failed to construct 'File': The 3rd argument is not of type Object.. 55 PASS (new File([], 'world.html', 'abc')) instanceof window.File threw exception TypeError: Failed to construct 'File': The 3rd argument is not of type Object..
54 PASS (new File([], 'world.html', [])) instanceof window.File is true 56 PASS (new File([], 'world.html', [])) instanceof window.File is true
55 PASS (new File([], 'world.html', /abc/)) instanceof window.File is true 57 PASS (new File([], 'world.html', /abc/)) instanceof window.File is true
56 PASS (new File([], 'world.html', function () {})) instanceof window.File is true 58 PASS (new File([], 'world.html', function () {})) instanceof window.File is true
57 PASS (new File([], 'world.html', {type:'text/html'})).name is 'world.html' 59 PASS (new File([], 'world.html', {type:'text/html'})).name is 'world.html'
58 PASS (new File([], 'world.html', {type:'text/html'})).type is 'text/html' 60 PASS (new File([], 'world.html', {type:'text/html'})).type is 'text/html'
59 PASS (new File([], 'world.html', {type:'text/html'})).size is 0 61 PASS (new File([], 'world.html', {type:'text/html'})).size is 0
60 PASS (new File([], 'world.html', {type:'text/plain;charset=UTF-8'})).type is 'te xt/plain;charset=utf-8' 62 PASS (new File([], 'world.html', {type:'text/plain;charset=UTF-8'})).type is 'te xt/plain;charset=utf-8'
63 PASS (new File([], 'world.html', {lastModifiedDate: aDate})).lastModifiedDate in stanceof Date is true
64 PASS (new File([], 'world.html', {lastModifiedDate: aDate})).lastModifiedDate.va lueOf() is aDate.valueOf()
65 PASS (new File([], 'world.html', {lastModifiedDate: 441532800000})).lastModified Date instanceof Date is true
66 PASS (new File([], 'world.html', {lastModifiedDate: 441532800000})).lastModified Date.valueOf() is aDate.valueOf()
67 PASS Math.abs(Date.now() - (new File([], 'world.html')).lastModifiedDate) <= 100 0 is true
61 PASS window.File.length is 2 68 PASS window.File.length is 2
62 PASS new File([new DataView(new ArrayBuffer(100))], 'world.html').size is 100 69 PASS new File([new DataView(new ArrayBuffer(100))], 'world.html').size is 100
63 PASS new File([new Uint8Array(100)], 'world.html').size is 100 70 PASS new File([new Uint8Array(100)], 'world.html').size is 100
64 PASS new File([new Uint8ClampedArray(100)], 'world.html').size is 100 71 PASS new File([new Uint8ClampedArray(100)], 'world.html').size is 100
65 PASS new File([new Uint16Array(100)], 'world.html').size is 200 72 PASS new File([new Uint16Array(100)], 'world.html').size is 200
66 PASS new File([new Uint32Array(100)], 'world.html').size is 400 73 PASS new File([new Uint32Array(100)], 'world.html').size is 400
67 PASS new File([new Int8Array(100)], 'world.html').size is 100 74 PASS new File([new Int8Array(100)], 'world.html').size is 100
68 PASS new File([new Int16Array(100)], 'world.html').size is 200 75 PASS new File([new Int16Array(100)], 'world.html').size is 200
69 PASS new File([new Int32Array(100)], 'world.html').size is 400 76 PASS new File([new Int32Array(100)], 'world.html').size is 400
70 PASS new File([new Float32Array(100)], 'world.html').size is 400 77 PASS new File([new Float32Array(100)], 'world.html').size is 400
(...skipping 20 matching lines...) Expand all
91 PASS new File({length: 0}, 'world.txt').size is 0 98 PASS new File({length: 0}, 'world.txt').size is 0
92 PASS new File({length: 1, 0: 'string'}, 'world.txt').size is 6 99 PASS new File({length: 1, 0: 'string'}, 'world.txt').size is 6
93 PASS new File({length: 2, 0: new Uint8Array(100), 1: new Int16Array(100)}, 'worl d.txt').size is 300 100 PASS new File({length: 2, 0: new Uint8Array(100), 1: new Int16Array(100)}, 'worl d.txt').size is 300
94 PASS new File({length: 1, 0: 'string'}, 'world.txt', {type: 'text/html'}).type i s 'text/html' 101 PASS new File({length: 1, 0: 'string'}, 'world.txt', {type: 'text/html'}).type i s 'text/html'
95 PASS new File({length: 0}, 'world.txt', {endings:'illegal'}) threw exception Typ eError: Failed to construct 'File': The "endings" property must be either "trans parent" or "native".. 102 PASS new File({length: 0}, 'world.txt', {endings:'illegal'}) threw exception Typ eError: Failed to construct 'File': The "endings" property must be either "trans parent" or "native"..
96 PASS new File(throwingSequence, 'world.txt') threw exception Error: Misbehaving property. 103 PASS new File(throwingSequence, 'world.txt') threw exception Error: Misbehaving property.
97 PASS successfullyParsed is true 104 PASS successfullyParsed is true
98 105
99 TEST COMPLETE 106 TEST COMPLETE
100 107
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698