toolkit/components/search/tests/xpcshell/test_nodb.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:26830a39a6bd
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 /*
5 * test_nodb: Start search engine
6 * - without search-metadata.json
7 * - without search.sqlite
8 *
9 * Ensure that :
10 * - nothing explodes;
11 * - no search-metadata.json is created.
12 */
13
14
15 function run_test()
16 {
17 removeMetadata();
18 updateAppInfo();
19
20 let search = Services.search;
21
22 do_test_pending();
23 search.init(function ss_initialized(rv) {
24 do_check_true(Components.isSuccessCode(rv));
25 do_timeout(500, function() {
26 // Check that search-metadata.json has not been
27 // created. Note that we cannot do much better
28 // than a timeout for checking a non-event.
29 let metadata = gProfD.clone();
30 metadata.append("search-metadata.json");
31 do_check_true(!metadata.exists());
32 removeMetadata();
33
34 do_test_finished();
35 });
36 });
37 }

mercurial