Commit e57e8f72 authored by Rachel Wong's avatar Rachel Wong Committed by Commit Bot

[settings logging] Add unit tests for the logging functions.

Bug: 1014839
Change-Id: Ie568d00cd2a40b104ea204b6e73e6a73f8cb5e3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029389Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarTony Yeoman <tby@chromium.org>
Commit-Queue: Rachel Wong <wrong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738742}
parent 1b7db534
......@@ -1874,6 +1874,7 @@ test("ash_unittests") {
"system/ime/ime_feature_pod_controller_unittest.cc",
"system/ime_menu/ime_menu_tray_unittest.cc",
"system/locale/locale_feature_pod_controller_unittest.cc",
"system/machine_learning/user_settings_event_logger_unittest.cc",
"system/message_center/arc/arc_notification_content_view_unittest.cc",
"system/message_center/arc/arc_notification_manager_unittest.cc",
"system/message_center/arc/arc_notification_view_unittest.cc",
......@@ -2052,6 +2053,7 @@ test("ash_unittests") {
"//ash/public/cpp/vector_icons",
"//ash/resources/vector_icons",
"//ash/strings",
"//ash/system/machine_learning:user_settings_event_proto",
"//ash/system/message_center/arc",
"//ash/system/message_center/arc:test_support",
"//base",
......@@ -2088,6 +2090,7 @@ test("ash_unittests") {
"//components/prefs:test_support",
"//components/quirks",
"//components/sync_preferences:test_support",
"//components/ukm:test_support",
"//components/user_manager",
"//components/user_manager:test_support",
"//device/bluetooth",
......@@ -2100,6 +2103,7 @@ test("ash_unittests") {
"//services/device/public/cpp/bluetooth",
"//services/media_session/public/cpp/test:test_support",
"//services/media_session/public/mojom",
"//services/metrics/public/cpp:ukm_builders",
"//skia",
"//testing/gmock",
"//testing/gtest",
......
include_rules = [
"+components/ukm/test_ukm_recorder.h",
"+services/metrics/public/cpp",
]
......@@ -55,7 +55,6 @@ UserSettingsEventLogger::~UserSettingsEventLogger() {
chromeos::CrasAudioHandler::Get()->RemoveAudioObserver(this);
}
// TODO(crbug/1014839): Write unit tests for the LogUkmEvent methods.
void UserSettingsEventLogger::LogNetworkUkmEvent(
const NetworkStateProperties& network) {
UserSettingsEvent settings_event;
......
......@@ -17,8 +17,8 @@ namespace ash {
namespace ml {
// This class handles logging for settings changes that are initiated by the
// user from the quick settings tray.
class UserSettingsEventLogger
// user from the quick settings tray. Exported for tests.
class ASH_EXPORT UserSettingsEventLogger
: public ShellObserver,
public chromeos::CrasAudioHandler::AudioObserver {
public:
......
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