blob: ab9f985887131df3a2b285986945af84fe85e9e0 [file] [log] [blame]
var xhrBlobTestUrl = '/xmlhttprequest/resources/access-control-allow-lists.php';
var xhrBlobTestCases = [{
mime: 'text/plain;charset=utf-8',
expectedMime: 'text/plain;charset=utf-8'
}, {
mime: 'Invalid/Type\r\n;charset=koi8-r',
expectedMime: ''
}, {
mime: 'ASCII/CR\r;charset=invalid',
expectedMime: ''
}, {
mime: 'ASCII/LF\n;charset=UTF-16BE',
expectedMime: ''
}, {
mime: 'Unicode/CRLF\u000D\u000A;charset=Ventura-US',
expectedMime: ''
}, {
mime: 'Unicode/CR\u000Dcharset=windows-1251',
expectedMime: ''
}, {
mime: 'Unicode/LF\u000Acharset=windows-1252',
expectedMime: ''
}, {
mime: 'multipart/mixed;boundary="--blob-boundary',
expectedMime: ''
}, {
mime: 'multipart/mixed;boundary="--blob-boundary"',
expectedMime: 'multipart/mixed;boundary="--blob-boundary"'
}, {
mime: '',
expectedMime: ''
}, {
mime: '',
expectedMime: '',
closeBeforeSend: true
}, {
mime: '\u0422\u0435\u0441\u0442',
expectedMime: '',
}, {
mime: 'text/plain;charset=utf-8',
expectedMime: 'text/plain;charset=utf-8',
shouldThrow: true,
url: 'http://localhost:8000',
allowOrigin: ''
}, {
mime: 'text/plain;charset=utf-8',
expectedMime: 'text/plain;charset=utf-8',
url: 'http://localhost:8000',
allowOrigin: '?origin=http://127.0.0.1:8000'
}, {
mime: 'text/plain;charset=utf-8',
expectedMime: 'text/plain;charset=utf-8',
file: 'hello.txt'
}, {
mime: 'ASCII/CR\r;charset=invalid',
expectedMime: '',
file: 'hello.txt'
}, {
mime: '',
expectedMime: '',
file: 'hello.txt'
}, {
mime: 'multipart/mixed;boundary="--blob-boundary"',
expectedMime: 'multipart/mixed;boundary="--blob-boundary"',
file: 'hello.txt'
}, {
mime: '\u0422\u0435\u0441\u0442',
expectedMime: '',
file: 'hello.txt'
}, {
mime: '',
expectedMime: '',
file: 'hello.txt',
closeBeforeSend: true
}];