gecko-dev/dom/file/tests/test_fileapi_twice_worker.html
Andrea Marchesini 2fc80505b6 Bug 1305230 - Splitting test_fileapi.html and test_fileapi_worker.html in multiple files, r=me
--HG--
rename : dom/file/tests/test_fileapi.html => dom/file/tests/test_fileapi_basic.html
rename : dom/file/tests/test_fileapi_worker.html => dom/file/tests/test_fileapi_basic_worker.html
rename : dom/file/tests/test_fileapi.html => dom/file/tests/test_fileapi_encoding.html
rename : dom/file/tests/test_fileapi_worker.html => dom/file/tests/test_fileapi_encoding_worker.html
rename : dom/file/tests/test_fileapi.html => dom/file/tests/test_fileapi_other.html
rename : dom/file/tests/test_fileapi_worker.html => dom/file/tests/test_fileapi_other_worker.html
rename : dom/file/tests/test_fileapi.html => dom/file/tests/test_fileapi_twice.html
rename : dom/file/tests/test_fileapi_worker.html => dom/file/tests/test_fileapi_twice_worker.html
2017-10-17 13:21:39 +02:00

39 lines
872 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<title>Test for FileReader API in workers</title>
<script type="text/javascript" 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: 'twice', 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>