storage/test/unit/test_storage_service_unshared.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 // This file tests the openUnsharedDatabase function of mozIStorageService.
     7 function test_openUnsharedDatabase_file_DNE()
     8 {
     9   // the file should be created after calling
    10   var db = getTestDB();
    11   do_check_false(db.exists());
    12   getService().openUnsharedDatabase(db);
    13   do_check_true(db.exists());
    14 }
    16 function test_openUnsharedDatabase_file_exists()
    17 {
    18   // it should already exist from our last test
    19   var db = getTestDB();
    20   do_check_true(db.exists());
    21   getService().openUnsharedDatabase(db);
    22   do_check_true(db.exists());
    23 }
    25 var tests = [test_openUnsharedDatabase_file_DNE,
    26              test_openUnsharedDatabase_file_exists];
    28 function run_test()
    29 {
    30   for (var i = 0; i < tests.length; i++)
    31     tests[i]();
    33   cleanup();
    34 }

mercurial