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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/sharedarraybuffer/fast/files/blob-constructor-expected.txt

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO 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
(Empty)
1 Test the Blob constructor.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 PASS (new Blob()) instanceof window.Blob is true
7 PASS (new Blob(undefined)) instanceof window.Blob is true
8 PASS (new Blob([])) instanceof window.Blob is true
9 PASS (new Blob(['hello'])) instanceof window.Blob is true
10 PASS (new Blob(['hello'], {})) instanceof window.Blob is true
11 PASS (new Blob(['hello'], {type:'text/html'})) instanceof window.Blob is true
12 PASS (new Blob(['hello'], {type:'text/html', endings:'native'})) instanceof wind ow.Blob is true
13 PASS (new Blob(['hello'], {type:'text/html', endings:'transparent'})) instanceof window.Blob is true
14 PASS (new Blob()).size is 0
15 PASS (new Blob(undefined)).size is 0
16 PASS (new Blob()).type is ""
17 PASS (new Blob(undefined)).type is ""
18 PASS new Blob('hello') threw exception TypeError: Failed to construct 'Blob': Th e 1st argument is neither an array, nor does it have indexed properties..
19 PASS new Blob(0) threw exception TypeError: Failed to construct 'Blob': The 1st argument is neither an array, nor does it have indexed properties..
20 PASS new Blob(null) threw exception TypeError: Failed to construct 'Blob': The 1 st argument is neither an array, nor does it have indexed properties..
21 PASS (new Blob([])) instanceof window.Blob is true
22 PASS (new Blob(['stringPrimitive'])) instanceof window.Blob is true
23 PASS (new Blob([String('stringObject')])) instanceof window.Blob is true
24 PASS (new Blob([new Blob])) instanceof window.Blob is true
25 PASS (new Blob([new Blob([new Blob])])) instanceof window.Blob is true
26 PASS (new Blob([12])).size is 2
27 PASS (new Blob([[]])).size is 0
28 PASS (new Blob([{}])).size is 15
29 PASS (new Blob([document])).size is 21
30 PASS (new Blob([toStringingObj])).size is 8
31 PASS new Blob([throwingObj]) threw exception Error.
32 PASS (new Blob([], {unknownKey:'value'})) instanceof window.Blob is true
33 PASS new Blob([], {endings:'illegalValue'}) threw exception TypeError: Failed to construct 'Blob': The provided value 'illegalValue' is not a valid enum value o f type NormalizeLineEndings..
34 PASS new Blob([], {endings:throwingObj}) threw exception Error.
35 PASS new Blob([], {type:throwingObj}) threw exception Error.
36 PASS new Blob([], {endings:throwingObj1, type:throwingObj2}) threw exception Err or 1.
37 PASS new Blob([], {type:throwingObj2, endings:throwingObj1}) threw exception Err or 1.
38 PASS new Blob([], {type:throwingObj2, endings:'illegal'}) threw exception TypeEr ror: Failed to construct 'Blob': The provided value 'illegal' is not a valid enu m value of type NormalizeLineEndings..
39 PASS new Blob([], {type:'hello\u00EE'}).type is ""
40 PASS new Blob([], {type:'hello\u001F'}).type is ""
41 PASS new Blob([], {type:'hello\u007F'}).type is ""
42 PASS new Blob([], {type:'ABC/abc'}).type is "abc/abc"
43 PASS new Blob([], {type:'123ABCabc'}).type is "123abcabc"
44 PASS (new Blob([], null)) instanceof window.Blob is true
45 PASS (new Blob([], undefined)) instanceof window.Blob is true
46 PASS (new Blob([], 123)) instanceof window.Blob threw exception TypeError: Faile d to construct 'Blob': parameter 2 ('options') is not an object..
47 PASS (new Blob([], 123.4)) instanceof window.Blob threw exception TypeError: Fai led to construct 'Blob': parameter 2 ('options') is not an object..
48 PASS (new Blob([], true)) instanceof window.Blob threw exception TypeError: Fail ed to construct 'Blob': parameter 2 ('options') is not an object..
49 PASS (new Blob([], 'abc')) instanceof window.Blob threw exception TypeError: Fai led to construct 'Blob': parameter 2 ('options') is not an object..
50 PASS (new Blob([], [])) instanceof window.Blob is true
51 PASS (new Blob([], /abc/)) instanceof window.Blob is true
52 PASS (new Blob([], function () {})) instanceof window.Blob is true
53 PASS (new Blob([], {type:'text/html'})).type is 'text/html'
54 PASS (new Blob([], {type:'text/html'})).size is 0
55 PASS (new Blob([], {type:'text/plain;charset=UTF-8'})).type is 'text/plain;chars et=utf-8'
56 PASS (new Blob([])).lastModified is undefined
57 PASS (new Blob([], {})).lastModified is undefined
58 PASS (new Blob([], {lastModified: new Date()})).lastModified is undefined
59 PASS window.Blob.length is 0
60 PASS new Blob([new DataView(new ArrayBuffer(100))]).size is 100
61 PASS new Blob([new Uint8Array(100)]).size is 100
62 PASS new Blob([new Uint8ClampedArray(100)]).size is 100
63 PASS new Blob([new Uint16Array(100)]).size is 200
64 PASS new Blob([new Uint32Array(100)]).size is 400
65 PASS new Blob([new Int8Array(100)]).size is 100
66 PASS new Blob([new Int16Array(100)]).size is 200
67 PASS new Blob([new Int32Array(100)]).size is 400
68 PASS new Blob([new Float32Array(100)]).size is 400
69 PASS new Blob([new Float64Array(100)]).size is 800
70 PASS new Blob([new Float64Array(100), new Int32Array(100), new Uint8Array(100), new DataView(new ArrayBuffer(100))]).size is 1400
71 PASS new Blob([new Blob([new Int32Array(100)]), new Uint8Array(100), new Float32 Array(100), new DataView(new ArrayBuffer(100))]).size is 1000
72 PASS new Blob([(new DataView(new ArrayBuffer(100))).buffer]).size is 100
73 PASS new Blob([(new Uint8Array(100)).buffer]).size is 100
74 PASS new Blob([(new Uint8ClampedArray(100)).buffer]).size is 100
75 PASS new Blob([(new Uint16Array(100)).buffer]).size is 200
76 PASS new Blob([(new Uint32Array(100)).buffer]).size is 400
77 PASS new Blob([(new Int8Array(100)).buffer]).size is 100
78 PASS new Blob([(new Int16Array(100)).buffer]).size is 200
79 PASS new Blob([(new Int32Array(100)).buffer]).size is 400
80 PASS new Blob([(new Float32Array(100)).buffer]).size is 400
81 PASS new Blob([(new Float64Array(100)).buffer]).size is 800
82 PASS new Blob([(new Float64Array(100)).buffer, (new Int32Array(100)).buffer, (ne w Uint8Array(100)).buffer, (new DataView(new ArrayBuffer(100))).buffer]).size is 1400
83 PASS new Blob([new Blob([(new Int32Array(100)).buffer]), (new Uint8Array(100)).b uffer, (new Float32Array(100)).buffer, (new DataView(new ArrayBuffer(100))).buff er]).size is 1000
84 PASS new Blob([new Uint8Array(new SharedArrayBuffer(4))]) threw exception TypeEr ror: Failed to construct 'Blob': The provided ArrayBufferView value must not be shared..
85 PASS new Blob({length: 0}).size is 0
86 PASS new Blob({length: 1, 0: 'string'}).size is 6
87 PASS OMICRON_WITH_OXIA.charCodeAt(0) is 0x1F79
88 PASS reader.result.charCodeAt(0) is 0x1F79
89 PASS CONTAINS_UNPAIRED_SURROGATES.charCodeAt(3) is 0xDC00
90 PASS CONTAINS_UNPAIRED_SURROGATES.charCodeAt(7) is 0xD800
91 PASS reader.result.charCodeAt(3) is 0xFFFD
92 PASS reader.result.charCodeAt(7) is 0xFFFD
93 PASS successfullyParsed is true
94
95 TEST COMPLETE
96
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698