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.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | "use strict"; |
michael@0 | 5 | |
michael@0 | 6 | Cu.import("resource://testing-common/services-common/bagheeraserver.js"); |
michael@0 | 7 | |
michael@0 | 8 | function run_test() { |
michael@0 | 9 | run_next_test(); |
michael@0 | 10 | } |
michael@0 | 11 | |
michael@0 | 12 | add_test(function test_server_empty() { |
michael@0 | 13 | let server = new BagheeraServer(); |
michael@0 | 14 | |
michael@0 | 15 | do_check_false(server.hasNamespace("foo")); |
michael@0 | 16 | do_check_false(server.hasDocument("foo", "bar")); |
michael@0 | 17 | do_check_null(server.getDocument("foo", "bar")); |
michael@0 | 18 | |
michael@0 | 19 | server.createNamespace("foo"); |
michael@0 | 20 | do_check_true(server.hasNamespace("foo")); |
michael@0 | 21 | |
michael@0 | 22 | run_next_test(); |
michael@0 | 23 | }); |
michael@0 | 24 | |
michael@0 | 25 | add_test(function test_server_start() { |
michael@0 | 26 | let server = new BagheeraServer(); |
michael@0 | 27 | server.start(); |
michael@0 | 28 | server.stop(run_next_test); |
michael@0 | 29 | }); |
michael@0 | 30 |