OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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.. | 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.. |
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.. | 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.. |
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.. | 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.. |
54 PASS (new File([], 'world.html', [])) instanceof window.File is true | 54 PASS (new File([], 'world.html', [])) instanceof window.File is true |
55 PASS (new File([], 'world.html', /abc/)) instanceof window.File is true | 55 PASS (new File([], 'world.html', /abc/)) instanceof window.File is true |
56 PASS (new File([], 'world.html', function () {})) instanceof window.File is true | 56 PASS (new File([], 'world.html', function () {})) instanceof window.File is true |
57 PASS (new File([], 'world.html', {type:'text/html'})).name is 'world.html' | 57 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' | 58 PASS (new File([], 'world.html', {type:'text/html'})).type is 'text/html' |
59 PASS (new File([], 'world.html', {type:'text/html'})).size is 0 | 59 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' | 60 PASS (new File([], 'world.html', {type:'text/plain;charset=UTF-8'})).type is 'te
xt/plain;charset=utf-8' |
| 61 PASS (new File([], 'world.html', {lastModified: 441532800000})).lastModified is
441532800000 |
| 62 PASS (new File([], 'world.html')).lastModified is equivalent to Date.now(). |
| 63 PASS (new File([], 'world.html', {})).lastModified is equivalent to Date.now(). |
| 64 PASS (new File([], 'world.html', {type: 'text/plain'})).lastModified is equivale
nt to Date.now(). |
| 65 PASS (new File([], 'world.html', {lastModified: new Date(441532800000)})).lastMo
dified is 441532800000 |
| 66 PASS (new File([], 'world.html', {lastModified: 441532800000})).lastModifiedDate
instanceof Date is true |
| 67 PASS (new File([], 'world.html', {lastModified: 441532800000})).lastModifiedDate
.valueOf() is 441532800000 |
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 Loading... |
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 |
OLD | NEW |