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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     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  */
    15 function run_test()
    16 {
    17   removeMetadata();
    18   updateAppInfo();
    20   let search = Services.search;
    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();
    34       do_test_finished();
    35     });
    36   });
    37 }

mercurial