Commit 8e8b36aa authored by Swapnil's avatar Swapnil Committed by Commit Bot

Add unit tests for ExtensionInstallEventLogUploader

ExtensionInstallEventLogUploader class acts as an adapter between the
system that captures and stores extension install event logs and the
policy system which uploads them to the management server. Add unit
tests for the class.

Bug: 1100862
Change-Id: Id0e753ebe846ce25417e8ce6be8159007b9335f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2275894Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: Swapnil Gupta <swapnilgupta@google.com>
Cr-Commit-Position: refs/heads/master@{#784478}
parent 128988e8
......@@ -3261,6 +3261,7 @@ source_set("unit_tests") {
"policy/extension_cache_unittest.cc",
"policy/extension_install_event_log_collector_unittest.cc",
"policy/extension_install_event_log_unittest.cc",
"policy/extension_install_event_log_uploader_unittest.cc",
"policy/extension_install_event_logger_unittest.cc",
"policy/external_data_handlers/device_native_printers_external_data_handler_unittest.cc",
"policy/fake_affiliated_invalidation_service_provider.cc",
......
......@@ -67,6 +67,7 @@ class MockCloudPolicyClient : public CloudPolicyClient {
const enterprise_management::ChildStatusReportRequest*,
StatusCallback&));
MOCK_METHOD0(CancelAppInstallReportUpload, void(void));
MOCK_METHOD0(CancelExtensionInstallReportUpload, void(void));
void UpdateGcmId(const std::string& id, StatusCallback callback) override {
UpdateGcmId_(id, callback);
}
......@@ -109,6 +110,12 @@ class MockCloudPolicyClient : public CloudPolicyClient {
UploadAppInstallReport_(value, callback);
}
MOCK_METHOD2(UploadAppInstallReport_, void(base::Value&, StatusCallback&));
void UploadExtensionInstallReport(base::Value value,
StatusCallback callback) override {
UploadExtensionInstallReport_(value, callback);
}
MOCK_METHOD2(UploadExtensionInstallReport_,
void(base::Value&, StatusCallback&));
MOCK_METHOD5(ClientCertProvisioningStartCsr,
void(const std::string& cert_scope,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment