Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0

This commit is contained in:
Ms2ger 2016-09-09 09:40:35 +02:00
parent 1d40075f03
commit 079092dfea
2381 changed files with 90360 additions and 17722 deletions

View file

@ -80,14 +80,13 @@
assert_equals(fd.get('key'), "null");
}, 'testFormDataAppendToFormNull2');
test(function() {
var f1 = create_formdata(['key', new Blob(), 'blank.txt']).get('key');
var f2 = new File([new Blob()], 'blank.txt');
var fileAttrs = ['name', 'size', 'type'];
fileAttrs.forEach(function(attr) {
assert_equals(f1[attr], f2[attr], attr + " should be equal");
});
var before = new Date(new Date().getTime() - 2000); // two seconds ago, in case there's clock drift
var fd = create_formdata(['key', new Blob(), 'blank.txt']).get('key');
assert_equals(fd.name, "blank.txt");
assert_equals(fd.type, "");
assert_equals(fd.size, 0);
assert_greater_than_equal(fd.lastModified, before);
assert_less_than_equal(fd.lastModified, new Date());
}, 'testFormDataAppendEmptyBlob');
function create_formdata() {