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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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