blob: 8e3d1dc3b7a45bb5e3c10cb85e624bb4f2160307 [file] [log] [blame]
<html>
<body>
<p>Test Blob.size of response blob received for XMLHttpRequest</p>
<pre id="console"></pre>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function log(text)
{
var console = document.getElementById('console');
console.appendChild(document.createTextNode(text + '\n'));
}
function test(expect, actual)
{
log((expect == actual ? 'PASS' : 'FAIL') + ': "' + expect + '" == "' + actual + '"');
}
var req = new XMLHttpRequest;
req.responseType = 'blob';
req.open('GET', '../resources/test.ogv', true);
req.onreadystatechange = function() {
if (req.readyState == 4) {
test(200, req.status);
test(103746, req.response.size)
if (window.testRunner)
testRunner.notifyDone();
}
};
req.send(null);
</script>
</body>