Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
4 function send(message) {
5 self.postMessage(message);
6 }
8 function do_test_complete() {
9 send({kind: "do_test_complete", args: []});
10 }
12 function do_check_true(x) {
13 send({kind: "do_check_true", args: [!!x]});
14 if (x) {
15 dump("TEST-PASS: " + x + "\n");
16 } else {
17 throw new Error("do_check_true failed");
18 }
19 }
21 function do_check_eq(a, b) {
22 let result = a == b;
23 send({kind: "do_check_true", args: [result]});
24 if (!result) {
25 throw new Error("do_check_eq failed " + a + " != " + b);
26 }
27 }
29 function do_check_neq(a, b) {
30 let result = a != b;
31 send({kind: "do_check_true", args: [result]});
32 if (!result) {
33 throw new Error("do_check_neq failed " + a + " == " + b);
34 }
35 }
37 function do_print(x) {
38 dump("TEST-INFO: " + x + "\n");
39 }