Skip to content

Commit

Permalink
Move FormEventLoggerBase tests into a separate file.
Browse files Browse the repository at this point in the history
The tests are currently in autofill_metrics_unittest.cc. This CL moves
them to a new form_event_logger_base_unittest.cc file.

Since FormEventLoggerBase also emits UKM metrics, some of the UKM
testing functionality defined in autofill_metrics_unittest.cc is needed
in form_event_logger_base_unittest.cc. For this reason, new
ukm_metrics_test_utils.(cc|h) files are created. They contain all the
UKM testing helper functions that are currently part of
autofill_metrics_unittest.cc.

The code is moved 1:1 % renaming the test fixture.

Bug: 1007974
Change-Id: I1110890405782919595d519331fe351b3efcb1fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4253948
Commit-Queue: Florian Leimgruber <fleimgruber@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1106147}
  • Loading branch information
florianleimgruber authored and Chromium LUCI CQ committed Feb 16, 2023
1 parent d80f313 commit 164166e
Show file tree
Hide file tree
Showing 5 changed files with 702 additions and 574 deletions.
3 changes: 3 additions & 0 deletions components/autofill/core/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ static_library("test_support") {
"logging/text_log_receiver.h",
"metrics/autofill_metrics_test_base.cc",
"metrics/autofill_metrics_test_base.h",
"metrics/ukm_metrics_test_utils.cc",
"metrics/ukm_metrics_test_utils.h",
"mock_autocomplete_history_manager.cc",
"mock_autocomplete_history_manager.h",
"mock_iban_manager.cc",
Expand Down Expand Up @@ -909,6 +911,7 @@ source_set("unit_tests") {
"manual_testing_profile_import_unittest.cc",
"merchant_promo_code_manager_unittest.cc",
"metrics/autofill_metrics_unittest.cc",
"metrics/form_events/form_event_logger_base_unittest.cc",
"metrics/payments/iban_metrics_unittest.cc",
"metrics/payments/offers_metrics_unittest.cc",
"metrics/profile_import_metrics_unittest.cc",
Expand Down

0 comments on commit 164166e

Please sign in to comment.