blob: b5e05c467825a99ce96dc972d2b7e8fad9b6ff46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
function run_test() {
do_load_manifest("data/chrome.manifest");
if (typeof Intl !== "object") {
dump("Intl not enabled, skipping test\n");
equal(true, true);
return;
}
let mainThreadLocale = Intl.NumberFormat().resolvedOptions().locale;
let testWorker = new Worker(
"chrome://locale/content/intl_on_workers_worker.js"
);
testWorker.onmessage = function (e) {
try {
let workerLocale = e.data;
equal(
mainThreadLocale,
workerLocale,
"Worker should inherit Intl locale from main thread."
);
} finally {
do_test_finished();
}
};
do_test_pending();
testWorker.postMessage("go!");
}
|