mirror of
https://github.com/servo/servo.git
synced 2025-08-24 06:45:33 +01:00
Update web-platform-tests to revision 89aa3f42131cce5a77268ddaeb2fab8a2e29c2a6
This commit is contained in:
parent
39963266ae
commit
ea00d34098
392 changed files with 5974 additions and 7614 deletions
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
'use strict'
|
||||
|
||||
// Sends two messages to its creator:
|
||||
// (1) The result of chooseFileSystemEntries().
|
||||
// (2) The result of FileSystemDirectoryHandle.getSystemDirectory().
|
||||
|
||||
function post_message(data) {
|
||||
if (window.parent !== null) {
|
||||
window.parent.postMessage(data, { targetOrigin: '*' });
|
||||
}
|
||||
if (window.opener !== null) {
|
||||
window.opener.postMessage(data, { targetOrigin: '*' });
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
window.chooseFileSystemEntries({ type: 'openDirectory' })
|
||||
.then(() => {
|
||||
post_message('chooseFileSystemEntries(): FULFILLED');
|
||||
}).catch(error => {
|
||||
post_message(`chooseFileSystemEntries(): REJECTED: ${error.name}`);
|
||||
});
|
||||
} catch (error) {
|
||||
post_message(`chooseFileSystemEntries(): EXCEPTION: ${error.name}`);
|
||||
}
|
||||
|
||||
try {
|
||||
window.FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' })
|
||||
.then(() => {
|
||||
post_message('getSystemDirectory(): FULFILLED');
|
||||
}).catch(error => {
|
||||
post_message(`getSystemDirectory(): REJECTED: ${error.name}`);
|
||||
});
|
||||
} catch (error) {
|
||||
post_message(`getSystemDirectory(): EXCEPTION: ${error.name}`);
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue