mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1629116 - Add an overrideTelemetryName to bridged extension storage. r=markh
Add an overrideTelemetryName to bridged extension storage. Differential Revision: https://phabricator.services.mozilla.com/D78413
This commit is contained in:
parent
b6a091d9dd
commit
d76d4f4c46
@ -80,6 +80,9 @@ ExtensionStorageEngineBridge.prototype = {
|
||||
// we don't support repair at all!
|
||||
_skipPercentageChance: 100,
|
||||
|
||||
// Used to override the engine name in telemetry, so that we can distinguish .
|
||||
overrideTelemetryName: "rust-webext-storage",
|
||||
|
||||
_notifyPendingChanges() {
|
||||
return new Promise(resolve => {
|
||||
this._bridge
|
||||
|
@ -143,7 +143,13 @@ add_task(async function test_engine() {
|
||||
);
|
||||
|
||||
info("Sync the engine");
|
||||
await sync_engine_and_validate_telem(engine, false);
|
||||
|
||||
let ping = await sync_engine_and_validate_telem(engine, false);
|
||||
Assert.ok(ping.engines.find(e => e.name == "rust-webext-storage"));
|
||||
Assert.equal(
|
||||
ping.engines.find(e => e.name == "extension-storage"),
|
||||
null
|
||||
);
|
||||
|
||||
// We should have applied the data from the existing collection record.
|
||||
Assert.deepEqual(await extensionStorageSync.get({ id: "ext-1" }, null), {
|
||||
|
@ -117,8 +117,12 @@ add_task(async function test_calling_sync_calls_ext_storage_sync() {
|
||||
await withSyncContext(async function(context) {
|
||||
// Set something so that everyone knows that we're using storage.sync
|
||||
await extensionStorageSync.set(extension, { a: "b" }, context);
|
||||
|
||||
await engine._sync();
|
||||
let ping = await sync_engine_and_validate_telem(engine, false);
|
||||
Assert.ok(ping.engines.find(e => e.name == "extension-storage"));
|
||||
Assert.equal(
|
||||
ping.engines.find(e => e.name == "rust-webext-storage"),
|
||||
null
|
||||
);
|
||||
});
|
||||
} finally {
|
||||
extensionStorageSync.syncAll = oldSync;
|
||||
|
Loading…
Reference in New Issue
Block a user