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

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

Issue 1526183004: Prevent SharedArrayBuffer views from being used in bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some tests Created 3 years, 11 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([], {type:'helloĆ®'}) threw exception SyntaxError: Failed to constr uct 'Blob': The 'type' property must consist of ASCII characters..
37 PASS new Blob([], {endings:throwingObj1, type:throwingObj2}) threw exception Err or 1.
38 PASS new Blob([], {type:throwingObj2, endings:throwingObj1}) threw exception Err or 1.
39 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..
40 PASS (new Blob([], null)) instanceof window.Blob is true
41 PASS (new Blob([], undefined)) instanceof window.Blob is true
42 PASS (new Blob([], 123)) instanceof window.Blob threw exception TypeError: Faile d to construct 'Blob': parameter 2 ('options') is not an object..
43 PASS (new Blob([], 123.4)) instanceof window.Blob threw exception TypeError: Fai led to construct 'Blob': parameter 2 ('options') is not an object..
44 PASS (new Blob([], true)) instanceof window.Blob threw exception TypeError: Fail ed to construct 'Blob': parameter 2 ('options') is not an object..
45 PASS (new Blob([], 'abc')) instanceof window.Blob threw exception TypeError: Fai led to construct 'Blob': parameter 2 ('options') is not an object..
46 PASS (new Blob([], [])) instanceof window.Blob is true
47 PASS (new Blob([], /abc/)) instanceof window.Blob is true
48 PASS (new Blob([], function () {})) instanceof window.Blob is true
49 PASS (new Blob([], {type:'text/html'})).type is 'text/html'
50 PASS (new Blob([], {type:'text/html'})).size is 0
51 PASS (new Blob([], {type:'text/plain;charset=UTF-8'})).type is 'text/plain;chars et=utf-8'
52 PASS (new Blob([])).lastModified is undefined
53 PASS (new Blob([], {})).lastModified is undefined
54 PASS (new Blob([], {lastModified: new Date()})).lastModified is undefined
55 PASS window.Blob.length is 0
56 PASS new Blob([new DataView(new ArrayBuffer(100))]).size is 100
57 PASS new Blob([new Uint8Array(100)]).size is 100
58 PASS new Blob([new Uint8ClampedArray(100)]).size is 100
59 PASS new Blob([new Uint16Array(100)]).size is 200
60 PASS new Blob([new Uint32Array(100)]).size is 400
61 PASS new Blob([new Int8Array(100)]).size is 100
62 PASS new Blob([new Int16Array(100)]).size is 200
63 PASS new Blob([new Int32Array(100)]).size is 400
64 PASS new Blob([new Float32Array(100)]).size is 400
65 PASS new Blob([new Float64Array(100)]).size is 800
66 PASS new Blob([new Float64Array(100), new Int32Array(100), new Uint8Array(100), new DataView(new ArrayBuffer(100))]).size is 1400
67 PASS new Blob([new Blob([new Int32Array(100)]), new Uint8Array(100), new Float32 Array(100), new DataView(new ArrayBuffer(100))]).size is 1000
68 PASS new Blob([new Uint8Array(new SharedArrayBuffer(100))]) threw exception Type Error: Failed to construct 'Blob': sequence parameter 1 contains a view of a Sha redArrayBuffer..
69 PASS new Blob([new Uint8ClampedArray(new SharedArrayBuffer(100))]) threw excepti on TypeError: Failed to construct 'Blob': sequence parameter 1 contains a view o f a SharedArrayBuffer..
70 PASS new Blob([new Uint16Array(new SharedArrayBuffer(100))]) threw exception Typ eError: Failed to construct 'Blob': sequence parameter 1 contains a view of a Sh aredArrayBuffer..
71 PASS new Blob([new Uint32Array(new SharedArrayBuffer(100))]) threw exception Typ eError: Failed to construct 'Blob': sequence parameter 1 contains a view of a Sh aredArrayBuffer..
72 PASS new Blob([new Int8Array(new SharedArrayBuffer(100))]) threw exception TypeE rror: Failed to construct 'Blob': sequence parameter 1 contains a view of a Shar edArrayBuffer..
73 PASS new Blob([new Int16Array(new SharedArrayBuffer(100))]) threw exception Type Error: Failed to construct 'Blob': sequence parameter 1 contains a view of a Sha redArrayBuffer..
74 PASS new Blob([new Int32Array(new SharedArrayBuffer(100))]) threw exception Type Error: Failed to construct 'Blob': sequence parameter 1 contains a view of a Sha redArrayBuffer..
75 PASS new Blob([new Float32Array(new SharedArrayBuffer(100))]) threw exception Ty peError: Failed to construct 'Blob': sequence parameter 1 contains a view of a S haredArrayBuffer..
76 PASS new Blob([new Float64Array(new SharedArrayBuffer(104))]) threw exception Ty peError: Failed to construct 'Blob': sequence parameter 1 contains a view of a S haredArrayBuffer..
77 PASS new Blob([(new DataView(new ArrayBuffer(100))).buffer]).size is 100
78 PASS new Blob([(new Uint8Array(100)).buffer]).size is 100
79 PASS new Blob([(new Uint8ClampedArray(100)).buffer]).size is 100
80 PASS new Blob([(new Uint16Array(100)).buffer]).size is 200
81 PASS new Blob([(new Uint32Array(100)).buffer]).size is 400
82 PASS new Blob([(new Int8Array(100)).buffer]).size is 100
83 PASS new Blob([(new Int16Array(100)).buffer]).size is 200
84 PASS new Blob([(new Int32Array(100)).buffer]).size is 400
85 PASS new Blob([(new Float32Array(100)).buffer]).size is 400
86 PASS new Blob([(new Float64Array(100)).buffer]).size is 800
87 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
88 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
89 PASS new Blob({length: 0}).size is 0
90 PASS new Blob({length: 1, 0: 'string'}).size is 6
91 PASS OMICRON_WITH_OXIA.charCodeAt(0) is 0x1F79
92 PASS reader.result.charCodeAt(0) is 0x1F79
93 PASS CONTAINS_UNPAIRED_SURROGATES.charCodeAt(3) is 0xDC00
94 PASS CONTAINS_UNPAIRED_SURROGATES.charCodeAt(7) is 0xD800
95 PASS reader.result.charCodeAt(3) is 0xFFFD
96 PASS reader.result.charCodeAt(7) is 0xFFFD
97 PASS successfullyParsed is true
98
99 TEST COMPLETE
100
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698