mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'
This commit is contained in:
parent
35e95f55a1
commit
58e8ee674b
9438 changed files with 266112 additions and 106976 deletions
|
@ -38,25 +38,5 @@
|
|||
}, 'showOpenFilePicker returns correct permissions');
|
||||
}, 'showOpenFilePicker works');
|
||||
|
||||
promise_test(async t => {
|
||||
await window.test_driver.bless(
|
||||
'show a file picker.<br />Please select file-system-access/resources/data/testfile.txt');
|
||||
const files = await self.showOpenFilePicker({
|
||||
multiple: false,
|
||||
startIn: null,
|
||||
types: [
|
||||
{ description: 'Text files', accept: { ' text/plain ': ['.txt'] } },
|
||||
{ description: 'Images', accept: { ' image/* ': ['.jpg', '.jpeg', '.png'] } },
|
||||
],
|
||||
});
|
||||
assert_true(Array.isArray(files));
|
||||
assert_equals(files.length, 1);
|
||||
assert_true(files[0] instanceof FileSystemHandle);
|
||||
assert_true(files[0] instanceof FileSystemFileHandle);
|
||||
assert_equals(files[0].kind, "file");
|
||||
assert_equals(files[0].name, 'testfile.txt');
|
||||
assert_equals(await (await files[0].getFile()).text(), 'Hello World!\n');
|
||||
}, 'showOpenFilePicker does not fail when starting directory is null');
|
||||
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue