зеркало из https://github.com/mozilla/gecko-dev.git
Bug 680816: Test
This commit is contained in:
Родитель
1bbca22aa7
Коммит
3ddd814eea
|
@ -121,6 +121,17 @@ ab = xhr.response;
|
|||
ok(ab != null, "should have a non-null arraybuffer");
|
||||
arraybuffer_equals_to(ab, "hello pass\n");
|
||||
|
||||
// test reusing the same XHR (Bug 680816)
|
||||
xhr.open("GET", 'file_XHR_binary1.bin', false);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.send(null);
|
||||
is(xhr.status, 200, "wrong status");
|
||||
ab2 = xhr.response;
|
||||
ok(ab2 != null, "should have a non-null arraybuffer");
|
||||
ok(ab2 != ab, "arraybuffer on XHR reuse should be distinct");
|
||||
arraybuffer_equals_to(ab, "hello pass\n");
|
||||
arraybuffer_equals_to(ab2, "\xaa\xee\0\x03\xff\xff\xff\xff\xbb\xbb\xbb\xbb");
|
||||
|
||||
// with a binary file
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", 'file_XHR_binary1.bin', false);
|
||||
|
|
Загрузка…
Ссылка в новой задаче