Bug 1461965 - Enable xpcshell test coverage for GeckoView Telemetry. r=chutten,froydnj,janerik
This patch introduces the nsITelemetryGeckoViewTesting IDL interface which allows to control the Telemetry GeckoView persistence feature. This is useful to enable xpcshell test coverage for GeckoView code on all platforms. MozReview-Commit-ID: Hh0oq4qdqrX
This commit is contained in:
@@ -59,6 +59,10 @@
|
||||
#include "nsPerformanceStats.h"
|
||||
#endif // defined (MOZ_HAS_PERFSTATS)
|
||||
|
||||
#if defined(ENABLE_TESTS)
|
||||
#include "geckoview/TelemetryGeckoViewTesting.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -128,6 +132,10 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ExtensionPolicyService, ExtensionPolicy
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSessionStoreUtils)
|
||||
|
||||
#if defined(ENABLE_TESTS)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(TelemetryGeckoViewTestingImpl)
|
||||
#endif
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_TOOLKIT_APPSTARTUP_CID);
|
||||
#if defined(MOZ_HAS_PERFSTATS)
|
||||
NS_DEFINE_NAMED_CID(NS_TOOLKIT_PERFORMANCESTATSSERVICE_CID);
|
||||
@@ -162,6 +170,9 @@ NS_DEFINE_NAMED_CID(NS_ADDON_MANAGER_STARTUP_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_ADDON_POLICY_SERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SESSIONSTOREUTILS_CID);
|
||||
NS_DEFINE_NAMED_CID(NATIVE_FILEWATCHER_SERVICE_CID);
|
||||
#if defined(ENABLE_TESTS)
|
||||
NS_DEFINE_NAMED_CID(NS_TELEMETRYGECKOVIEWTESTING_CID);
|
||||
#endif
|
||||
|
||||
static const Module::CIDEntry kToolkitCIDs[] = {
|
||||
{ &kNS_TOOLKIT_APPSTARTUP_CID, false, nullptr, nsAppStartupConstructor },
|
||||
@@ -197,6 +208,9 @@ static const Module::CIDEntry kToolkitCIDs[] = {
|
||||
{ &kNS_ADDON_POLICY_SERVICE_CID, false, nullptr, ExtensionPolicyServiceConstructor },
|
||||
{ &kNS_SESSIONSTOREUTILS_CID, false, nullptr, nsSessionStoreUtilsConstructor },
|
||||
{ &kNATIVE_FILEWATCHER_SERVICE_CID, false, nullptr, NativeFileWatcherServiceConstructor },
|
||||
#if defined(ENABLE_TESTS)
|
||||
{ &kNS_TELEMETRYGECKOVIEWTESTING_CID, false, nullptr, TelemetryGeckoViewTestingImplConstructor },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
@@ -235,6 +249,9 @@ static const Module::ContractIDEntry kToolkitContracts[] = {
|
||||
{ NS_ADDON_POLICY_SERVICE_CONTRACTID, &kNS_ADDON_POLICY_SERVICE_CID },
|
||||
{ NS_SESSIONSTOREUTILS_CONTRACTID, &kNS_SESSIONSTOREUTILS_CID },
|
||||
{ NATIVE_FILEWATCHER_SERVICE_CONTRACTID, &kNATIVE_FILEWATCHER_SERVICE_CID },
|
||||
#if defined(ENABLE_TESTS)
|
||||
{ NS_TELEMETRYGECKOVIEWTESTING_CONTRACTID, &kNS_TELEMETRYGECKOVIEWTESTING_CID },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user