diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /dom/file/tests/test_fileapi_other_worker.html | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream/1%115.7.0.tar.xz thunderbird-upstream/1%115.7.0.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/file/tests/test_fileapi_other_worker.html')
-rw-r--r-- | dom/file/tests/test_fileapi_other_worker.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dom/file/tests/test_fileapi_other_worker.html b/dom/file/tests/test_fileapi_other_worker.html new file mode 100644 index 0000000000..a535d3fcb4 --- /dev/null +++ b/dom/file/tests/test_fileapi_other_worker.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>Test for FileReader API in workers</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> + <script type="text/javascript" src="common_fileReader.js"></script> +</head> + +<body> +<script class="testbody" type="text/javascript"> + +SimpleTest.waitForExplicitFinish(); +SimpleTest.requestLongerTimeout(3); + +test_setup() +.then(data => { + let worker = new Worker('worker_fileReader.js'); + worker.postMessage({ tests: 'other', data }); + + worker.onmessage = event => { + if (event.data.type == 'finish') { + SimpleTest.finish(); + return; + } + + if (event.data.type == 'check') { + ok(event.data.status, event.data.msg); + return; + } + + ok(false, "Unknown message."); + } +}); + +</script> +</body> +</html> |