Update web-platform-tests to revision 0b22439430b6d8d9a6d43a0908e86c0366f207c0

This commit is contained in:
WPT Sync Bot 2019-07-06 10:25:38 +00:00
parent 39ec04a065
commit c8e806d0ef
93 changed files with 2118 additions and 597 deletions

View file

@ -15,12 +15,8 @@ if (navigator.userAgent.includes("Windows NT")) {
async function cleanupSandboxedFileSystem() {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
for await (let entry of dir.getEntries()) {
if (entry.isDirectory)
await entry.removeRecursively();
else
await entry.remove();
}
for await (let entry of dir.getEntries())
dir.removeEntry(entry.name, { recursive: entry.isDirectory });
}
async function getFileSize(handle) {
@ -60,7 +56,7 @@ async function createDirectory(test, name, parent) {
const new_dir_handle = await parent_dir_handle.getDirectory(name, { create: true });
test.add_cleanup(async () => {
try {
await new_dir_handle.removeRecursively();
await parent_dir_handle.removeEntry(name, { recursive: true });
} catch (e) {
// Ignore any errors when removing directories, as tests might
// have already removed the directory.
@ -74,7 +70,7 @@ async function createEmptyFile(test, name, parent) {
const handle = await dir.getFile(name, { create: true });
test.add_cleanup(async () => {
try {
await handle.remove();
await dir.removeEntry(name);
} catch (e) {
// Ignore any errors when removing files, as tests might already remove the file.
}