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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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