Bug 1892041 - Part 1: Update test262 features. r=spidermonkey-reviewers,dminor
[gecko.git] / dom / filesystem / tests / worker_basic.js
blob2771c778fdf772ad63c82ce525b51a10a1449f57
1 /* eslint-env worker */
2 importScripts("filesystem_commons.js");
4 function finish() {
5   postMessage({ type: "finish" });
8 function ok(a, msg) {
9   postMessage({ type: "test", test: !!a, message: msg });
12 function is(a, b, msg) {
13   ok(a === b, msg);
16 function isnot(a, b, msg) {
17   ok(a != b, msg);
20 var tests = [
21   function () {
22     test_basic(directory, next);
23   },
24   function () {
25     test_getFilesAndDirectories(directory, true, next);
26   },
27   function () {
28     test_getFiles(directory, false, next);
29   },
30   function () {
31     test_getFiles(directory, true, next);
32   },
35 function next() {
36   if (!tests.length) {
37     finish();
38     return;
39   }
41   var test = tests.shift();
42   test();
45 var directory;
47 onmessage = function (e) {
48   directory = e.data;
49   next();