Commit 2077a8a9 authored by kinuko@chromium.org's avatar kinuko@chromium.org

2010-06-22 Kinuko Yasuda <kinuko@chromium.org>

        Reviewed by Adam Barth.

        Add BlobBuilder.idl to expose BlobBuilder interface
        https://bugs.webkit.org/show_bug.cgi?id=40593

        (Resubmitting with the correct file set.)

        BlobBuilder is defined in FileAPI's FileWriter spec.
        (http://dev.w3.org/2009/dap/file-system/file-writer.html)

        Also removes the ENABLE_FILE_WRITER ifdef guard for BlobBuilder.

        Tests: http/tests/local/blob/send-data-blob.html
               http/tests/local/blob/send-hybrid-blob.html
               http/tests/local/blob/send-sliced-data-blob.html

        * Android.derived.jscbindings.mk:
        * Android.derived.v8bindings.mk:
        * CMakeLists.txt:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * html/BlobBuilder.cpp:
        (WebCore::BlobBuilder::append):
        * html/BlobBuilder.h:
        * html/BlobBuilder.idl: Added.
        * page/DOMWindow.idl:
2010-06-22  Kinuko Yasuda  <kinuko@chromium.org>

        Reviewed by Adam Barth.

        Add BlobBuilder.idl to expose BlobBuilder interface
        https://bugs.webkit.org/show_bug.cgi?id=40593

        (Resubmitting with the correct file set.)

        Add new layout tests to test BlobBuilder interface.
        Also update test expectations affected by adding the constructors to DOMWindow.

        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/Window/window-property-descriptors-expected.txt:
        * fast/dom/constructed-objects-prototypes-expected.txt:
        * fast/dom/prototype-inheritance-2-expected.txt:
        * fast/dom/prototype-inheritance-expected.txt:
        * fast/js/global-constructors-expected.txt:
        * http/tests/local/blob/resources/hybrid-blob-util.js: Added.
        * http/tests/local/blob/script-tests/TEMPLATE.html: Added.
        * http/tests/local/blob/script-tests/send-data-blob.js: Added.
        * http/tests/local/blob/script-tests/send-hybrid-blob.js: Added.
        * http/tests/local/blob/script-tests/send-sliced-data-blob.js: Added.
        * http/tests/local/blob/send-data-blob-expected.txt: Added.
        * http/tests/local/blob/send-data-blob.html: Added.
        * http/tests/local/blob/send-hybrid-blob-expected.txt: Added.
        * http/tests/local/blob/send-hybrid-blob.html: Added.
        * http/tests/local/blob/send-sliced-data-blob-expected.txt: Added.
        * http/tests/local/blob/send-sliced-data-blob.html: Added.
        * http/tests/local/resources/file-for-drag-to-send2.txt: Added.
        * http/tests/resources/post-and-verify-hybrid.cgi: Added.
        * platform/chromium/fast/dom/prototype-inheritance-expected.txt:
        * platform/gtk/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles and Blob.slice.
        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
        * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/gtk/fast/dom/prototype-inheritance-expected.txt:
        * platform/qt/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles and Blob.slice.
        * platform/qt/fast/dom/Window/window-properties-expected.txt:
        * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/qt/fast/dom/prototype-inheritance-expected.txt:
        * platform/win/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles and Blob.slice.
        * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-2-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f2809680
2010-06-22 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Adam Barth.
Add BlobBuilder.idl to expose BlobBuilder interface
https://bugs.webkit.org/show_bug.cgi?id=40593
(Resubmitting with the correct file set.)
Add new layout tests to test BlobBuilder interface.
Also update test expectations affected by adding the constructors to DOMWindow.
* fast/dom/Window/window-properties-expected.txt:
* fast/dom/Window/window-property-descriptors-expected.txt:
* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/dom/prototype-inheritance-2-expected.txt:
* fast/dom/prototype-inheritance-expected.txt:
* fast/js/global-constructors-expected.txt:
* http/tests/local/blob/resources/hybrid-blob-util.js: Added.
* http/tests/local/blob/script-tests/TEMPLATE.html: Added.
* http/tests/local/blob/script-tests/send-data-blob.js: Added.
* http/tests/local/blob/script-tests/send-hybrid-blob.js: Added.
* http/tests/local/blob/script-tests/send-sliced-data-blob.js: Added.
* http/tests/local/blob/send-data-blob-expected.txt: Added.
* http/tests/local/blob/send-data-blob.html: Added.
* http/tests/local/blob/send-hybrid-blob-expected.txt: Added.
* http/tests/local/blob/send-hybrid-blob.html: Added.
* http/tests/local/blob/send-sliced-data-blob-expected.txt: Added.
* http/tests/local/blob/send-sliced-data-blob.html: Added.
* http/tests/local/resources/file-for-drag-to-send2.txt: Added.
* http/tests/resources/post-and-verify-hybrid.cgi: Added.
* platform/chromium/fast/dom/prototype-inheritance-expected.txt:
* platform/gtk/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles and Blob.slice.
* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/gtk/fast/dom/prototype-inheritance-expected.txt:
* platform/qt/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles and Blob.slice.
* platform/qt/fast/dom/Window/window-properties-expected.txt:
* platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/qt/fast/dom/prototype-inheritance-expected.txt:
* platform/win/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles and Blob.slice.
* platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/win/fast/dom/prototype-inheritance-2-expected.txt:
* platform/win/fast/dom/prototype-inheritance-expected.txt:
2010-06-22 Adele Peterson <adele@apple.com>
Reviewed by Darin Adler.
......
......@@ -150,6 +150,10 @@ window.BeforeLoadEvent.prototype.stopImmediatePropagation [function]
window.BeforeLoadEvent.prototype.stopPropagation [function]
window.Blob [object BlobConstructor]
window.Blob.prototype [object BlobPrototype]
window.BlobBuilder [object BlobBuilderConstructor]
window.BlobBuilder.prototype [object BlobBuilderPrototype]
window.BlobBuilder.prototype.append [function]
window.BlobBuilder.prototype.getBlob [function]
window.CDATASection [object CDATASectionConstructor]
window.CDATASection.prototype [object CDATASectionPrototype]
window.CDATASection.prototype.ATTRIBUTE_NODE [number]
......
......@@ -8,6 +8,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'Attr') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Audio') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BeforeLoadEvent') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Blob') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BlobBuilder') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Boolean') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CDATASection') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CSSCharsetRule') is 'object'
......
......@@ -5,6 +5,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS (new inner.Audio()).isInner is true
PASS (new inner.Audio()).constructor.isInner is true
PASS (new inner.BlobBuilder()).isInner is true
PASS (new inner.BlobBuilder()).constructor.isInner is true
PASS (new inner.DOMParser()).isInner is true
PASS (new inner.DOMParser()).constructor.isInner is true
PASS (new inner.FormData()).isInner is true
......
......@@ -208,6 +208,7 @@ PASS WebKitCSSKeyframesRule from inner.document.getElementById("dummyStyle").she
PASS WebKitCSSKeyframesRuleConstructor from inner.document.getElementById("dummyStyle").sheet.cssRules.6.constructor
PASS WebKitCSSKeyframesRulePrototype from inner.document.getElementById("dummyStyle").sheet.cssRules.6.__proto__
Never found Audio
Never found BlobBuilder
Never found Blob
Never found CDATASection
Never found CSSRule
......
......@@ -11,6 +11,8 @@ PASS inner.BeforeLoadEvent.isInner is true
PASS inner.BeforeLoadEvent.constructor.isInner is true
PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
......
......@@ -7,6 +7,7 @@ PASS Attr.toString() is '[object AttrConstructor]'
PASS Audio.toString() is '[object AudioConstructor]'
PASS BeforeLoadEvent.toString() is '[object BeforeLoadEventConstructor]'
PASS Blob.toString() is '[object BlobConstructor]'
PASS BlobBuilder.toString() is '[object BlobBuilderConstructor]'
PASS CDATASection.toString() is '[object CDATASectionConstructor]'
PASS CSSCharsetRule.toString() is '[object CSSCharsetRuleConstructor]'
PASS CSSFontFaceRule.toString() is '[object CSSFontFaceRuleConstructor]'
......
var HybridBlobTestUtil = function(testFunc, opt_filePaths) {
this.testCallbackFunc = testFunc;
this.testFilePaths = opt_filePaths;
this.testFiles = [];
this.testFileMap = {};
this.fileInput = null;
this.dragBaseDir = "";
this.urlPathBaseDir = "";
this.testUrl = "http://127.0.0.1:8000/resources/post-and-verify-hybrid.cgi";
this.uploadBlob = function(blob, urlParameter)
{
var xhr = new XMLHttpRequest();
xhr.open("POST", this.testUrl + "?" + urlParameter, false);
var passed;
var message;
try {
xhr.send(blob);
if (xhr.responseText == "OK") {
passed = true;
message = "Expected response data received: " + xhr.responseText;
} else {
passed = false;
message = "Unexpected response data received: " + xhr.responseText;
}
} catch (ex) {
passed = false;
message = "Unexpected exception thrown: " + ex;
}
if (passed)
testPassed(message);
else
testFailed(message + ' params:' + urlParameter);
};
this.onInputFileChange = function()
{
var files = document.getElementById("file").files;
this.testFiles = new Array();
for (var i = 0; i < files.length; i++) {
this.testFiles.push(files[i]);
this.testFileMap[testFilePaths[i]] = files[i];
}
this.testCallbackFunc();
};
this.runTestsWithDrag = function()
{
this.fileInput = document.createElement("input");
this.fileInput.id = "file";
this.fileInput.type = "file";
this.fileInput.style.width = "100px";
this.fileInput.style.height = "100px";
this.fileInput.multiple = true;
var obj = this;
this.fileInput.addEventListener("change", function() { obj.onInputFileChange() }, false);
document.body.insertBefore(this.fileInput, document.body.firstChild);
if (this.dragBaseDir) {
var filePaths = [];
for (var i = 0; i < this.testFilePaths.length; ++i) {
filePaths.push(this.dragBaseDir + this.testFilePaths[i]);
}
this.testFilePaths = filePaths;
}
eventSender.beginDragWithFiles(this.testFilePaths);
eventSender.mouseMoveTo(10, 10);
eventSender.mouseUp();
};
this.runTests = function() {
if (!this.testCallbackFunc)
testFailed("Test body function is not initialized.");
else if (this.testFilePaths)
this.runTestsWithDrag();
else
this.testCallbackFunc();
};
this.FileItem = function(path)
{
var item = new Object();
item.type = 'file';
item.path = path;
item.value = this.testFileMap[path];
return item;
}
this.DataItem = function(data)
{
var item = new Object();
item.type = 'data';
item.value = data;
return item;
}
this.createItemParamArray = function(items, itemParams, opt_ending)
{
for (var i = 0; i < items.length; i++) {
if (items[i] instanceof Array)
this.createItemParamArray(items[i], itemParams, opt_ending);
else if (items[i].type == "data") {
var data = items[i].value;
if (opt_ending)
data = data.replace(/\r\n/g, "[NL]").replace(/[\n\r]/g, "[NL]");
itemParams.push("data:" + escape(data));
} else if (items[i].type == "file")
itemParams.push("file:" + this.urlPathBaseDir + items[i].path);
}
};
this.createUrlParameter = function(items, opt_range, opt_ending)
{
var itemParams = [];
this.createItemParamArray(items, itemParams, opt_ending);
var urlParameter = "items=" + itemParams.join(",");
if (opt_range) {
urlParameter += "&start=" + opt_range.start;
urlParameter += "&length=" + opt_range.length;
}
if (opt_ending)
urlParameter += "&convert_newlines=1";
return urlParameter;
};
this.appendAndCreateBlob = function(items, opt_ending, opt_type)
{
var bb = new BlobBuilder();
for (var i = 0; i < items.length; i++) {
if (items[i] instanceof Array) {
// If it's an array, combine its elements and append as a blob.
bb.append(this.appendAndCreateBlob(items[i], opt_ending, opt_type));
} else if (items[i].type == "data" && opt_ending)
bb.append(items[i].value, opt_ending);
else
bb.append(items[i].value);
}
return bb.getBlob(opt_type);
};
};
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../../../fast/js/resources/js-test-style.css">
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="resources/hybrid-blob-util.js"></script>
<script src="YOUR_JS_FILE_HERE"></script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
description("Test for building blobs with multiple strings combined by BlobBuilder and sending them via XMLHttpRequest.");
var util = new HybridBlobTestUtil(runTests);
function runAppendTest(appendItems, opt_ending, opt_urlParameter, opt_type)
{
var blob = util.appendAndCreateBlob(appendItems, opt_ending, opt_type);
var urlParameter = opt_urlParameter;
if (!opt_urlParameter)
urlParameter = util.createUrlParameter(appendItems, null, opt_ending);
if (opt_type != undefined)
shouldBe("'" + blob.type + "'", "'" + opt_type + "'");
util.uploadBlob(blob, urlParameter);
}
function runTests()
{
var stringA = util.DataItem('A1234567|');
var stringB = util.DataItem('B12345|');
var stringC = util.DataItem('C12345678901|');
var stringLF = util.DataItem('12345\n67890\n');
var stringCRLF = util.DataItem('ABCDE\r\nFGHIJ\r\n');
var stringCR = util.DataItem('abcde\rfghij\r');
debug('* BlobBuilder.append(string)');
runAppendTest([ stringA ]);
runAppendTest([ stringA, stringB ]);
runAppendTest([ stringA, stringB ], null, null, 'type/foo');
debug('* BlobBuilder.append(blob)');
runAppendTest([ [ stringA ] ]);
runAppendTest([ [ stringA, stringB, stringA ] ]);
runAppendTest([ [ stringA, stringC ] ], null, null, 'type/bar');
debug('* BlobBuilder.append(string/blob)');
runAppendTest([ [ [ stringA, stringB ], stringA ], stringC ]);
runAppendTest([ [ stringA, stringB, stringA ], stringC, [ stringA, stringB, stringA ] ]);
debug('* BlobBuilder.append(string/blob) - with recycled blob');
var mixedArray = [ [ stringA, stringB, stringA ], stringC, [ stringA, stringB ] , stringA ];
var blob = { 'type':'blob', 'value':util.appendAndCreateBlob(mixedArray) };
var parameter = util.createUrlParameter([ mixedArray, stringC, mixedArray ]);
runAppendTest([ blob, stringC, blob ], null, parameter);
debug('* BlobBuilder.append(string) - with line-endings');
runAppendTest([ stringLF ]);
runAppendTest([ stringCR ]);
runAppendTest([ stringCRLF ]);
debug('* BlobBuilder.append(string, "native") - with line-endings');
runAppendTest([ stringLF ], 'native');
runAppendTest([ stringCR ], 'native');
runAppendTest([ stringCRLF ], 'native');
runAppendTest([ stringCRLF, stringLF, stringCRLF ], 'native');
}
if (window.eventSender)
util.runTests();
else
testFailed("This test is not interactive, please run using DumpRenderTree");
var successfullyParsed = true;
description("Test for building blobs with multiple files combined by BlobBuilder and sending them via XMLHttpRequest. (This test requires eventSender.beginDragWithFiles)");
var testFilePaths = [
"nonexistent",
"empty.txt",
"file-for-drag-to-send.txt",
"file-for-drag-to-send2.txt",
"abe.png"
];
var util = new HybridBlobTestUtil(runTests, testFilePaths);
util.dragBaseDir = "../resources/";
util.urlPathBaseDir = "../local/resources/";
function runHybridBlobTest(fileIndexOrStrings, opt_range)
{
var blob = util.appendAndCreateBlob(fileIndexOrStrings);
var urlParameter = util.createUrlParameter(fileIndexOrStrings, opt_range);
if (opt_range)
blob = blob.slice(opt_range.start, opt_range.length);
util.uploadBlob(blob, urlParameter);
}
function runTests()
{
// Syntax sugar.
var F = function(path) { return util.FileItem(path); }
var D = function(data) { return util.DataItem(data); }
debug('* BlobBuilder.append(file) - single file');
for (var i = 0; i < testFilePaths.length; i++)
runHybridBlobTest(F(testFilePaths[i]));
debug('* BlobBuilder.append(file) - multiple files');
runHybridBlobTest([ F('nonexistent'),
F('empty.txt')]);
runHybridBlobTest([ F('empty.txt'),
F('file-for-drag-to-send.txt') ]);
runHybridBlobTest([ F('empty.txt'),
F('file-for-drag-to-send.txt'),
F('file-for-drag-to-send2.txt') ]);
runHybridBlobTest([ F('file-for-drag-to-send2.txt'),
F('file-for-drag-to-send2.txt') ]);
debug('* BlobBuilder.append(mixed)');
runHybridBlobTest([ [ F('empty.txt') ] ]);
runHybridBlobTest([ [ F('empty.txt'),
F('file-for-drag-to-send.txt') ],
F('file-for-drag-to-send2.txt') ]);
runHybridBlobTest([ D('abcde'),
F('file-for-drag-to-send2.txt'),
D('|123|456|') ]);
runHybridBlobTest([ F('empty.txt'),
D('13579'),
[ F('file-for-drag-to-send2.txt'),
F('file-for-drag-to-send.txt') ],
F('file-for-drag-to-send.txt'),
D('A_B_C_D_E')]);
debug('* BlobBuilder.append(mixed) - with Blob.slice()');
runHybridBlobTest([ F('file-for-drag-to-send.txt') ],
{ 'start': 5, 'length': 10 });
runHybridBlobTest([ [ F('file-for-drag-to-send2.txt') ] ],
{ 'start': 3, 'length': 17 });
runHybridBlobTest([ F('file-for-drag-to-send.txt'),
F('file-for-drag-to-send2.txt') ],
{ 'start': 3, 'length': 17 });
runHybridBlobTest([ F('file-for-drag-to-send2.txt'),
D('abcde'),
F('file-for-drag-to-send2.txt') ],
{ 'start': 3, 'length': 17 });
runHybridBlobTest([ F('file-for-drag-to-send2.txt'),
D('abcde'),
F('file-for-drag-to-send2.txt') ],
{ 'start': 33, 'length': 90 });
runHybridBlobTest([ F('file-for-drag-to-send2.txt'),
F('file-for-drag-to-send.txt'),
F('file-for-drag-to-send2.txt') ],
{ 'start': 33, 'length': 42 });
runHybridBlobTest([ F('empty.txt'),
F('file-for-drag-to-send.txt'),
F('file-for-drag-to-send2.txt'),
F('abe.png') ],
{ 'start': 20, 'length': 3000 });
layoutTestController.notifyDone();
}
if (window.eventSender) {
layoutTestController.waitUntilDone();
util.runTests();
} else
testFailed("This test is not interactive, please run using DumpRenderTree");
var successfullyParsed = true;
description("Test for slicing blobs created by BlobBuilder sending them via XMLHttpRequest.");
var util = new HybridBlobTestUtil(runTests);
function runSliceTest(appendItems, ranges)
{
var blob = util.appendAndCreateBlob(appendItems);
var range = {'start':0, 'length':-1};
for (var i = 0; i < ranges.length; ++i) {
blob = blob.slice(ranges[i].start, ranges[i].length);
range.start += ranges[i].start;
}
range.length = ranges[ranges.length - 1].length;
var urlParameter = util.createUrlParameter(appendItems, range);
util.uploadBlob(blob, urlParameter);
}
function runTests()
{
var stringA = util.DataItem('A1234567|');
var stringB = util.DataItem('B12345|');
var stringC = util.DataItem('C12345678901|');
var mixedArray = [ [ stringA, stringB, stringA ], stringC, [ stringA, stringB ] , stringA ];
debug('* BlobBuilder.append(data) and then apply Blob.slice()');
runSliceTest(stringA, [ {'start': 3, 'length': 12} ]);
runSliceTest([stringA, stringB], [ {'start': 3, 'length': 12} ]);
runSliceTest(mixedArray, [ {'start': 13, 'length': 40} ]);
runSliceTest(mixedArray, [ {'start': 13, 'length': 40} ]);
runSliceTest(mixedArray, [ {'start': 5, 'length': 32} ]);
debug('* BlobBuilder.append(data) and then apply nested Blob.slice()');
runSliceTest(mixedArray, [ {'start': 5, 'length': 32}, {'start': 2, 'length': 9} ]);
runSliceTest(mixedArray, [ {'start': 13, 'length': 40}, {'start': 5, 'length': 17} ]);
}
if (window.eventSender)
util.runTests();
else
testFailed("This test is not interactive, please run using DumpRenderTree");
var successfullyParsed = true;
Test for building blobs with multiple strings combined by BlobBuilder and sending them via XMLHttpRequest.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
* BlobBuilder.append(string)
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS 'type/foo' is 'type/foo'
PASS Expected response data received: OK
* BlobBuilder.append(blob)
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS 'type/bar' is 'type/bar'
PASS Expected response data received: OK
* BlobBuilder.append(string/blob)
PASS Expected response data received: OK
PASS Expected response data received: OK
* BlobBuilder.append(string/blob) - with recycled blob
PASS Expected response data received: OK
* BlobBuilder.append(string) - with line-endings
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
* BlobBuilder.append(string, "native") - with line-endings
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../../../fast/js/resources/js-test-style.css">
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="resources/hybrid-blob-util.js"></script>
<script src="script-tests/send-data-blob.js"></script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
Test for building blobs with multiple files combined by BlobBuilder and sending them via XMLHttpRequest. (This test requires eventSender.beginDragWithFiles)
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
* BlobBuilder.append(file) - single file
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
* BlobBuilder.append(file) - multiple files
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
* BlobBuilder.append(mixed)
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
* BlobBuilder.append(mixed) - with Blob.slice()
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../../../fast/js/resources/js-test-style.css">
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="resources/hybrid-blob-util.js"></script>
<script src="script-tests/send-hybrid-blob.js"></script>
<script src="../../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
Test for slicing blobs created by BlobBuilder sending them via XMLHttpRequest.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
* BlobBuilder.append(data) and then apply Blob.slice()
PASS Expected response data received: OK
PASS Expected response data received: OK
PASS Expected response data received: OK