summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/tests/unit/test_corrupt_telemetry.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/places/tests/unit/test_corrupt_telemetry.js')
-rw-r--r--toolkit/components/places/tests/unit/test_corrupt_telemetry.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/toolkit/components/places/tests/unit/test_corrupt_telemetry.js b/toolkit/components/places/tests/unit/test_corrupt_telemetry.js
deleted file mode 100644
index cd9e9ec0c..000000000
--- a/toolkit/components/places/tests/unit/test_corrupt_telemetry.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests that history initialization correctly handles a request to forcibly
-// replace the current database.
-
-add_task(function* () {
- let profileDBPath = yield OS.Path.join(OS.Constants.Path.profileDir, "places.sqlite");
- yield OS.File.remove(profileDBPath, {ignoreAbsent: true});
- // Ensure that our database doesn't already exist.
- Assert.ok(!(yield OS.File.exists(profileDBPath)), "places.sqlite shouldn't exist");
- let dir = yield OS.File.getCurrentDirectory();
- let src = OS.Path.join(dir, "corruptDB.sqlite");
- yield OS.File.copy(src, profileDBPath);
- Assert.ok(yield OS.File.exists(profileDBPath), "places.sqlite should exist");
-
- let count = Services.telemetry
- .getHistogramById("PLACES_DATABASE_CORRUPTION_HANDLING_STAGE")
- .snapshot()
- .counts[3];
- Assert.equal(count, 0, "There should be no telemetry");
-
- do_check_eq(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_CORRUPT);
-
- count = Services.telemetry
- .getHistogramById("PLACES_DATABASE_CORRUPTION_HANDLING_STAGE")
- .snapshot()
- .counts[3];
- Assert.equal(count, 1, "Telemetry should have been added");
-});