Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * This file tests migration replaces the database if schema version < 6.
6 */
8 add_test(function corrupt_database_not_exists() {
9 let dbFile = gProfD.clone();
10 dbFile.append("places.sqlite.corrupt");
11 do_check_false(dbFile.exists());
12 run_next_test();
13 });
15 add_test(function database_is_valid() {
16 do_check_eq(PlacesUtils.history.databaseStatus,
17 PlacesUtils.history.DATABASE_STATUS_CORRUPT);
18 do_check_eq(DBConn().schemaVersion, CURRENT_SCHEMA_VERSION);
19 run_next_test();
20 });
22 add_test(function corrupt_database_exists() {
23 let dbFile = gProfD.clone();
24 dbFile.append("places.sqlite.corrupt");
25 do_check_true(dbFile.exists());
26 run_next_test();
27 });
29 function run_test()
30 {
31 setPlacesDatabase("places_alpha.sqlite");
32 run_next_test();
33 }