0

Revert "remove underscores in test names //ash"

This reverts commit 3c77753b81.

Reason: https://groups.google.com/a/chromium.org/g/chromium-dev/c/KxzyXKv7adQ

Based on the discussion here, I have decided to terminate this work.

Bug: 377144451
Change-Id: I9171c3f47e728b23c5c1d38d4b638b18e6b0568a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6065878
Commit-Queue: Ho Cheung <hocheung@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Hugo Benichi <hugobenichi@google.com>
Cr-Commit-Position: refs/heads/main@{#1390804}
This commit is contained in:
Ho Cheung
2024-12-03 05:17:45 +00:00
committed by Chromium LUCI CQ
parent 7f5f29ec1c
commit 0b155cf910
102 changed files with 942 additions and 941 deletions
ash
accelerators
accessibility
app_list
assistant
birch
clipboard
components
display
extended_desktop_unittest.cc
fast_ink
focus
frame_sink
game_dashboard
login
quick_pair
root_window_controller_unittest.cc
rounded_display
shelf
style
system
wallpaper
webui
wm

@ -2622,7 +2622,7 @@ TEST_F(AcceleratorControllerTest, CalculatorKey) {
}
// Tests the IME mode change key.
TEST_F(AcceleratorControllerTest, ChangeIMEModeSwitchesInputMethod) {
TEST_F(AcceleratorControllerTest, ChangeIMEMode_SwitchesInputMethod) {
AddTestImes();
ImeController* controller = Shell::Get()->ime_controller();
@ -2999,7 +2999,7 @@ class AcceleratorControllerDeprecatedTest : public AcceleratorControllerTest {
};
// TODO(crbug.com/1179893): Remove once the feature is enabled permanently.
TEST_F(AcceleratorControllerDeprecatedTest, DeskShortcutsOld) {
TEST_F(AcceleratorControllerDeprecatedTest, DeskShortcuts_Old) {
// The shortcuts are Search+Shift+[MINUS|PLUS], but due to event
// rewriting they became Shift+[F11|F12]. So only the rewritten shortcut
// works but the "real" shortcut doesn't.

@ -359,7 +359,7 @@ TEST_F(FilterKeysEventRewriterBounceKeysTest, DifferentKeysResetDelay) {
EXPECT_EQ(LastEventKeyCode(), ui::VKEY_A);
}
TEST_F(FilterKeysEventRewriterBounceKeysTest, MultipleKeysADownBDownAUpBUp) {
TEST_F(FilterKeysEventRewriterBounceKeysTest, MultipleKeys_ADownBDownAUpBUp) {
AdvanceClockWithinBounceDelay();
PressA();
ASSERT_EQ(NumRecordedEvents(), 1u);
@ -410,7 +410,7 @@ TEST_F(FilterKeysEventRewriterBounceKeysTest, MultipleKeysADownBDownAUpBUp) {
EXPECT_EQ(LastEventKeyCode(), ui::VKEY_B);
}
TEST_F(FilterKeysEventRewriterBounceKeysTest, MultipleKeysADownBDownBUpAUp) {
TEST_F(FilterKeysEventRewriterBounceKeysTest, MultipleKeys_ADownBDownBUpAUp) {
AdvanceClockWithinBounceDelay();
PressA();
ASSERT_EQ(NumRecordedEvents(), 1u);

@ -535,7 +535,7 @@ TEST_F(AppListShowSourceMetricTest, ToggleDoesNotRecordOnHide) {
using AppListPeriodicMetricsTest = AshTestBase;
// Verify that the number of items in the app list are recorded correctly.
TEST_F(AppListPeriodicMetricsTest, PeriodicAppListMetricsNumberOfApps) {
TEST_F(AppListPeriodicMetricsTest, PeriodicAppListMetrics_NumberOfApps) {
base::HistogramTester histogram;
histogram.ExpectTotalCount("Apps.AppList.NumberOfApps", 0);
histogram.ExpectTotalCount("Apps.AppList.NumberOfRootLevelItems", 0);
@ -570,7 +570,7 @@ TEST_F(AppListPeriodicMetricsTest, PeriodicAppListMetricsNumberOfApps) {
histogram.ExpectBucketCount("Apps.AppList.NumberOfRootLevelItems", 6, 1);
}
TEST_F(AppListPeriodicMetricsTest, RecordFolderMetricsZeroFolders) {
TEST_F(AppListPeriodicMetricsTest, RecordFolderMetrics_ZeroFolders) {
base::HistogramTester histogram;
GetAppListTestHelper()->model()->PopulateApps(2);
@ -586,7 +586,7 @@ TEST_F(AppListPeriodicMetricsTest, RecordFolderMetricsZeroFolders) {
"Apps.AppList.NumberOfAppsInNonSystemFolders", 0));
}
TEST_F(AppListPeriodicMetricsTest, RecordFolderMetricsOneRegularFolder) {
TEST_F(AppListPeriodicMetricsTest, RecordFolderMetrics_OneRegularFolder) {
base::HistogramTester histogram;
GetAppListTestHelper()->model()->CreateAndPopulateFolderWithApps(2);
@ -602,7 +602,7 @@ TEST_F(AppListPeriodicMetricsTest, RecordFolderMetricsOneRegularFolder) {
"Apps.AppList.NumberOfAppsInNonSystemFolders", 2));
}
TEST_F(AppListPeriodicMetricsTest, RecordFolderMetricsSystemFolder) {
TEST_F(AppListPeriodicMetricsTest, RecordFolderMetrics_SystemFolder) {
base::HistogramTester histogram;
AppListFolderItem* folder =
GetAppListTestHelper()->model()->CreateSingleItemFolder("folder_id",

@ -123,7 +123,7 @@ TEST_F(AssistantMainStageTest, FooterIsVisibleAfterResponse) {
EXPECT_TRUE(footer->GetVisible());
}
TEST_F(AssistantMainStageTest, FooterIsVisibleTablet) {
TEST_F(AssistantMainStageTest, FooterIsVisible_Tablet) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndDisableFeature(
feature_engagement::kIPHLauncherSearchHelpUiFeature);
@ -135,7 +135,7 @@ TEST_F(AssistantMainStageTest, FooterIsVisibleTablet) {
EXPECT_TRUE(footer->GetVisible());
}
TEST_F(AssistantMainStageTest, FooterIsNotVisibleTablet) {
TEST_F(AssistantMainStageTest, FooterIsNotVisible_Tablet) {
base::test::ScopedFeatureList scoped_feature_list(
feature_engagement::kIPHLauncherSearchHelpUiFeature);
@ -146,7 +146,7 @@ TEST_F(AssistantMainStageTest, FooterIsNotVisibleTablet) {
EXPECT_FALSE(footer->GetVisible());
}
TEST_F(AssistantMainStageTest, FooterIsVisibleAfterQueryTablet) {
TEST_F(AssistantMainStageTest, FooterIsVisibleAfterQuery_Tablet) {
base::test::ScopedFeatureList scoped_feature_list(
feature_engagement::kIPHLauncherSearchHelpUiFeature);
@ -162,7 +162,7 @@ TEST_F(AssistantMainStageTest, FooterIsVisibleAfterQueryTablet) {
EXPECT_TRUE(footer->GetVisible());
}
TEST_F(AssistantMainStageTest, FooterIsVisibleAfterResponseTablet) {
TEST_F(AssistantMainStageTest, FooterIsVisibleAfterResponse_Tablet) {
base::test::ScopedFeatureList scoped_feature_list(
feature_engagement::kIPHLauncherSearchHelpUiFeature);

@ -80,7 +80,7 @@ TEST_F(AssistantZeroStateViewUnittest, ZeroStateViewIsNotVisibleAfterResponse) {
ASSERT_FALSE(zero_state_view->GetVisible());
}
TEST_F(AssistantZeroStateViewUnittest, OnboardingViewIsVisibleTabletMode) {
TEST_F(AssistantZeroStateViewUnittest, OnboardingViewIsVisible_TabletMode) {
base::test::ScopedFeatureList scoped_feature_list(
assistant::features::kEnableAssistantOnboarding);
@ -102,7 +102,7 @@ TEST_F(AssistantZeroStateViewUnittest, OnboardingViewIsVisibleTabletMode) {
EXPECT_FALSE(greeting_label->IsDrawn());
}
TEST_F(AssistantZeroStateViewUnittest, OnboardingViewIsNotVisibleTabletMode) {
TEST_F(AssistantZeroStateViewUnittest, OnboardingViewIsNotVisible_TabletMode) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(
assistant::features::kEnableAssistantOnboarding);
@ -215,7 +215,7 @@ TEST_F(AssistantZeroStateViewUnittest, IphViewIsNotVisibleAfterResponse) {
ASSERT_FALSE(launcher_search_iph->IsDrawn());
}
TEST_F(AssistantZeroStateViewUnittest, IphViewIsNotVisibleTabletMode) {
TEST_F(AssistantZeroStateViewUnittest, IphViewIsNotVisible_TabletMode) {
base::test::ScopedFeatureList feature_list_;
feature_list_.InitAndDisableFeature(
feature_engagement::kIPHLauncherSearchHelpUiFeature);
@ -239,7 +239,7 @@ TEST_F(AssistantZeroStateViewUnittest, IphViewIsNotVisibleTabletMode) {
ASSERT_FALSE(launcher_search_iph->IsDrawn());
}
TEST_F(AssistantZeroStateViewUnittest, IphViewIsVisibleTabletMode) {
TEST_F(AssistantZeroStateViewUnittest, IphViewIsVisible_TabletMode) {
base::test::ScopedFeatureList feature_list(
feature_engagement::kIPHLauncherSearchHelpUiFeature);

@ -118,7 +118,7 @@ class BirchItemTest : public testing::Test {
calendar_test_utils::ScopedLibcTimeZone scoped_libc_timezone_;
};
TEST_F(BirchItemTest, RecordActionMetricsBasics) {
TEST_F(BirchItemTest, RecordActionMetrics_Basics) {
base::HistogramTester histograms;
BirchWeatherItem item(u"item", 72.f, GURL("http://icon.com/"));
item.set_ranking(5.f);
@ -129,7 +129,7 @@ TEST_F(BirchItemTest, RecordActionMetricsBasics) {
histograms.ExpectBucketCount("Ash.Birch.Chip.ActivatedRanking", 5, 1);
}
TEST_F(BirchItemTest, RecordActionMetricsFirstSecondThird) {
TEST_F(BirchItemTest, RecordActionMetrics_FirstSecondThird) {
base::HistogramTester histograms;
BirchWeatherItem item(u"item", 72.f, GURL("http://icon.com/"));
@ -169,7 +169,7 @@ TEST_F(BirchItemTest, RecordActionMetricsFirstSecondThird) {
// When both conference URL and calendar URL are set, the conference URL is
// preferred.
TEST_F(BirchItemTest, Calendar_PerformActionBothConferenceAndCalendar) {
TEST_F(BirchItemTest, Calendar_PerformAction_BothConferenceAndCalendar) {
// Create an event that is happening now so the "Join" action is enabled.
base::Time now = base::Time::Now();
BirchCalendarItem item(u"item", /*start_time=*/now - base::Minutes(30),
@ -187,7 +187,7 @@ TEST_F(BirchItemTest, Calendar_PerformActionBothConferenceAndCalendar) {
EXPECT_EQ(new_window_delegate().last_opened_url_, GURL("http://meet.com/"));
}
TEST_F(BirchItemTest, CalendarPerformActionHistograms) {
TEST_F(BirchItemTest, Calendar_PerformAction_Histograms) {
base::HistogramTester histograms;
BirchCalendarItem item(u"item", /*start_time=*/base::Time(),
/*end_time=*/base::Time(),
@ -207,7 +207,7 @@ TEST_F(BirchItemTest, CalendarPerformActionHistograms) {
}
// If only the calendar URL is set, it is opened.
TEST_F(BirchItemTest, CalendarPerformActionCalendarOnly) {
TEST_F(BirchItemTest, Calendar_PerformAction_CalendarOnly) {
BirchCalendarItem item(u"item", /*start_time=*/base::Time(),
/*end_time=*/base::Time(),
/*calendar_url=*/GURL("http://calendar.com"),
@ -225,7 +225,7 @@ TEST_F(BirchItemTest, CalendarPerformActionCalendarOnly) {
}
// If neither the conference URL nor the calendar URL is set, nothing opens.
TEST_F(BirchItemTest, CalendarPerformActionNoURL) {
TEST_F(BirchItemTest, Calendar_PerformAction_NoURL) {
BirchCalendarItem item(u"item", /*start_time=*/base::Time(),
/*end_time=*/base::Time(),
/*calendar_url=*/GURL(),
@ -236,7 +236,7 @@ TEST_F(BirchItemTest, CalendarPerformActionNoURL) {
EXPECT_EQ(new_window_delegate().last_opened_url_, GURL());
}
TEST_F(BirchItemTest, CalendarShouldShowAddonAction) {
TEST_F(BirchItemTest, Calendar_ShouldShowAddonAction) {
base::Time now = base::Time::Now();
// Create an event with a conference URL, but in the future.
@ -274,7 +274,7 @@ TEST_F(BirchItemTest, CalendarShouldShowAddonAction) {
EXPECT_TRUE(item2.addon_label().has_value());
}
TEST_F(BirchItemTest, CalendarSubtitleOngoing) {
TEST_F(BirchItemTest, Calendar_Subtitle_Ongoing) {
BirchCalendarItem item(u"item",
/*start_time=*/base::Time::Now() - base::Minutes(30),
/*end_time=*/base::Time::Now() + base::Minutes(30),
@ -285,7 +285,7 @@ TEST_F(BirchItemTest, CalendarSubtitleOngoing) {
EXPECT_EQ(item.subtitle(), u"Now · Ends 5:30PM");
}
TEST_F(BirchItemTest, CalendarSubtitleSoon) {
TEST_F(BirchItemTest, Calendar_Subtitle_Soon) {
BirchCalendarItem item(u"item",
/*start_time=*/base::Time::Now() + base::Minutes(15),
/*end_time=*/base::Time::Now() + base::Hours(1),
@ -296,7 +296,7 @@ TEST_F(BirchItemTest, CalendarSubtitleSoon) {
EXPECT_EQ(item.subtitle(), u"In 15 mins · 5:15PM - 6:00PM");
}
TEST_F(BirchItemTest, CalendarSubtitleNotSoon) {
TEST_F(BirchItemTest, Calendar_Subtitle_NotSoon) {
BirchCalendarItem item(u"item",
/*start_time=*/base::Time::Now() + base::Hours(1),
/*end_time=*/base::Time::Now() + base::Hours(2),
@ -307,7 +307,7 @@ TEST_F(BirchItemTest, CalendarSubtitleNotSoon) {
EXPECT_EQ(item.subtitle(), u"6:00PM - 7:00PM");
}
TEST_F(BirchItemTest, CalendarSubtitleTomorrow) {
TEST_F(BirchItemTest, Calendar_Subtitle_Tomorrow) {
base::Time next_midnight = base::Time::Now().LocalMidnight() + base::Days(1);
BirchCalendarItem item(u"item",
/*start_time=*/next_midnight + base::Hours(1),
@ -319,7 +319,7 @@ TEST_F(BirchItemTest, CalendarSubtitleTomorrow) {
EXPECT_EQ(item.subtitle(), u"Tomorrow · 1:00AM - 2:00AM");
}
TEST_F(BirchItemTest, CalendarSubtitleAllDay) {
TEST_F(BirchItemTest, Calendar_Subtitle_AllDay) {
base::Time next_midnight = base::Time::Now().LocalMidnight() + base::Days(1);
BirchCalendarItem item(u"item",
/*start_time=*/next_midnight - base::Days(1),
@ -331,7 +331,7 @@ TEST_F(BirchItemTest, CalendarSubtitleAllDay) {
EXPECT_EQ(item.subtitle(), u"All Day");
}
TEST_F(BirchItemTest, AttachmentPerformActionValidUrl) {
TEST_F(BirchItemTest, Attachment_PerformAction_ValidUrl) {
BirchAttachmentItem item(u"item",
/*file_url=*/GURL("http://file.com/"),
/*icon_url=*/GURL("http://attachment.icon"),
@ -342,7 +342,7 @@ TEST_F(BirchItemTest, AttachmentPerformActionValidUrl) {
EXPECT_EQ(new_window_delegate().last_opened_url_, GURL("http://file.com/"));
}
TEST_F(BirchItemTest, AttachmentPerformActionHistograms) {
TEST_F(BirchItemTest, Attachment_PerformAction_Histograms) {
base::HistogramTester histograms;
BirchAttachmentItem item(u"item",
/*file_url=*/GURL("http://file.com/"),
@ -356,7 +356,7 @@ TEST_F(BirchItemTest, AttachmentPerformActionHistograms) {
BirchItemType::kAttachment, 1);
}
TEST_F(BirchItemTest, AttachmentPerformActionEmptyUrl) {
TEST_F(BirchItemTest, Attachment_PerformAction_EmptyUrl) {
BirchAttachmentItem item(u"item",
/*file_url=*/GURL(),
/*icon_url=*/GURL("http://attachment.icon"),
@ -367,7 +367,7 @@ TEST_F(BirchItemTest, AttachmentPerformActionEmptyUrl) {
EXPECT_EQ(new_window_delegate().last_opened_url_, GURL());
}
TEST_F(BirchItemTest, AttachmentSubtitleNow) {
TEST_F(BirchItemTest, Attachment_Subtitle_Now) {
base::Time now = base::Time::Now();
BirchAttachmentItem item(u"item",
/*file_url=*/GURL("http://file.com/"),
@ -378,7 +378,7 @@ TEST_F(BirchItemTest, AttachmentSubtitleNow) {
EXPECT_EQ(item.subtitle(), u"From event happening now");
}
TEST_F(BirchItemTest, AttachmentSubtitleUpcoming) {
TEST_F(BirchItemTest, Attachment_Subtitle_Upcoming) {
base::Time now = base::Time::Now();
BirchAttachmentItem item(u"item",
/*file_url=*/GURL("http://file.com/"),
@ -389,21 +389,21 @@ TEST_F(BirchItemTest, AttachmentSubtitleUpcoming) {
EXPECT_EQ(item.subtitle(), u"From upcoming calendar event");
}
TEST_F(BirchItemTest, FileTitleDoesNotShowFileExtension) {
TEST_F(BirchItemTest, File_TitleDoesNotShowFileExtension) {
BirchFileItem item(base::FilePath("/path/to/file.gdoc"), std::nullopt,
u"suggested", base::Time(), "id_1", "icon_url");
// The title does not contain the ".gdoc" extension.
EXPECT_EQ(u"file", item.title());
}
TEST_F(BirchItemTest, FileTitle) {
TEST_F(BirchItemTest, File_Title) {
BirchFileItem item(base::FilePath("/path/to/file.gdoc"), "file_title",
u"suggested", base::Time(), "id_1", "icon_url");
// When set, the title will take precedence over the file path.
EXPECT_EQ(u"file_title", item.title());
}
TEST_F(BirchItemTest, FilePerformAction) {
TEST_F(BirchItemTest, File_PerformAction) {
BirchFileItem item(base::FilePath("file_path"), "title", u"suggested",
base::Time(), "id_1", "icon_url");
EXPECT_EQ(u"title", item.title());
@ -415,7 +415,7 @@ TEST_F(BirchItemTest, FilePerformAction) {
base::FilePath("file_path"));
}
TEST_F(BirchItemTest, FilePerformActionHistograms) {
TEST_F(BirchItemTest, File_PerformAction_Histograms) {
base::HistogramTester histograms;
BirchFileItem item(base::FilePath("file_path"), "title", u"suggested",
base::Time(), "id_1", "icon_url");
@ -425,14 +425,14 @@ TEST_F(BirchItemTest, FilePerformActionHistograms) {
1);
}
TEST_F(BirchItemTest, WeatherPerformAction) {
TEST_F(BirchItemTest, Weather_PerformAction) {
BirchWeatherItem item(u"item", 72.f, GURL("http://icon.com/"));
item.PerformAction();
EXPECT_EQ(new_window_delegate().last_opened_url_,
GURL("https://google.com/search?q=weather"));
}
TEST_F(BirchItemTest, WeatherPerformActionHistograms) {
TEST_F(BirchItemTest, Weather_PerformAction_Histograms) {
base::HistogramTester histograms;
BirchWeatherItem item(u"item", 72.f, GURL("http://icon.com/"));
item.PerformAction();
@ -456,7 +456,7 @@ TEST_F(BirchWeatherItemTest, AddonLabelInCelsius) {
EXPECT_EQ(item.addon_label(), u"22");
}
TEST_F(BirchItemTest, TabSubtitleRecent) {
TEST_F(BirchItemTest, Tab_Subtitle_Recent) {
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time::Now() - base::Minutes(5),
/*favicon_url=*/GURL(), /*session_name=*/"Chromebook",
@ -464,7 +464,7 @@ TEST_F(BirchItemTest, TabSubtitleRecent) {
EXPECT_EQ(item.subtitle(), u"Within 1 hr · From Chromebook");
}
TEST_F(BirchItemTest, TabSubtitleOneHour) {
TEST_F(BirchItemTest, Tab_Subtitle_OneHour) {
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time::Now() - base::Minutes(65),
/*favicon_url=*/GURL(), /*session_name=*/"Chromebook",
@ -472,7 +472,7 @@ TEST_F(BirchItemTest, TabSubtitleOneHour) {
EXPECT_EQ(item.subtitle(), u"1 hr ago · From Chromebook");
}
TEST_F(BirchItemTest, TabSubtitleTwoHours) {
TEST_F(BirchItemTest, Tab_Subtitle_TwoHours) {
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time::Now() - base::Minutes(125),
/*favicon_url=*/GURL(), /*session_name=*/"Chromebook",
@ -480,7 +480,7 @@ TEST_F(BirchItemTest, TabSubtitleTwoHours) {
EXPECT_EQ(item.subtitle(), u"2 hr ago · From Chromebook");
}
TEST_F(BirchItemTest, TabSubtitleYesterday) {
TEST_F(BirchItemTest, Tab_Subtitle_Yesterday) {
BirchTabItem item(
u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time::Now().LocalMidnight() - base::Minutes(5),
@ -489,7 +489,7 @@ TEST_F(BirchItemTest, TabSubtitleYesterday) {
EXPECT_EQ(item.subtitle(), u"Yesterday · From Chromebook");
}
TEST_F(BirchItemTest, TabPerformActionValidUrl) {
TEST_F(BirchItemTest, Tab_PerformAction_ValidUrl) {
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time(),
/*favicon_url=*/GURL(), /*session_name=*/"",
@ -499,7 +499,7 @@ TEST_F(BirchItemTest, TabPerformActionValidUrl) {
GURL("http://example.com/"));
}
TEST_F(BirchItemTest, TabPerformActionEmptyUrl) {
TEST_F(BirchItemTest, Tab_PerformAction_EmptyUrl) {
BirchTabItem item(u"item", /*url=*/GURL(),
/*timestamp=*/base::Time(),
/*favicon_url=*/GURL(), /*session_name=*/"",
@ -508,7 +508,7 @@ TEST_F(BirchItemTest, TabPerformActionEmptyUrl) {
EXPECT_EQ(new_window_delegate().last_opened_url_, GURL());
}
TEST_F(BirchItemTest, TabPerformActionHistograms) {
TEST_F(BirchItemTest, Tab_PerformAction_Histograms) {
base::HistogramTester histograms;
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time(),
@ -520,32 +520,32 @@ TEST_F(BirchItemTest, TabPerformActionHistograms) {
1);
}
TEST_F(BirchItemTest, LastActiveSubtitleTwoDaysAgo) {
TEST_F(BirchItemTest, LastActive_Subtitle_TwoDaysAgo) {
BirchLastActiveItem item(u"item", GURL("http://example.com/"),
base::Time::Now() - base::Days(2));
EXPECT_EQ(item.subtitle(), u"2 days ago · Continue browsing");
}
TEST_F(BirchItemTest, LastActiveSubtitleYesterday) {
TEST_F(BirchItemTest, LastActive_Subtitle_Yesterday) {
BirchLastActiveItem item(u"item", GURL("http://example.com/"),
base::Time::Now() - base::Days(1));
EXPECT_EQ(item.subtitle(), u"Yesterday · Continue browsing");
}
TEST_F(BirchItemTest, LastActiveSubtitleOneHourAgo) {
TEST_F(BirchItemTest, LastActive_Subtitle_OneHourAgo) {
BirchLastActiveItem item(u"item", GURL("http://example.com/"),
base::Time::Now() - base::Hours(1));
EXPECT_EQ(item.subtitle(), u"1 hr ago · Continue browsing");
}
TEST_F(BirchItemTest, LastActivePerformAction) {
TEST_F(BirchItemTest, LastActive_PerformAction) {
BirchLastActiveItem item(u"item", GURL("http://example.com/"), base::Time());
item.PerformAction();
EXPECT_EQ(new_window_delegate().last_opened_url_,
GURL("http://example.com/"));
}
TEST_F(BirchItemTest, SelfSharePerformAction) {
TEST_F(BirchItemTest, SelfShare_PerformAction) {
base::MockCallback<base::RepeatingClosure> activation_callback;
BirchSelfShareItem item(
/*guid=*/u"self share guid", /*title*/ u"self share tab",
@ -583,7 +583,7 @@ class BirchItemIconTest : public AshTestBase {
base::test::ScopedFeatureList feature_list_;
};
TEST_F(BirchItemIconTest, CalendarLoadIcon) {
TEST_F(BirchItemIconTest, Calendar_LoadIcon) {
BirchCalendarItem item(u"item", /*start_time=*/base::Time(),
/*end_time=*/base::Time(),
/*calendar_url=*/GURL("http://calendar.com"),
@ -600,7 +600,7 @@ TEST_F(BirchItemIconTest, CalendarLoadIcon) {
}));
}
TEST_F(BirchItemIconTest, AttachmentLoadIcon) {
TEST_F(BirchItemIconTest, Attachment_LoadIcon) {
BirchAttachmentItem item(u"item",
/*file_url=*/GURL("http://file.com/"),
/*icon_url=*/GURL("http://attachment.icon"),
@ -623,7 +623,7 @@ TEST_F(BirchItemIconTest, AttachmentLoadIcon) {
EXPECT_FALSE(icon_cache->Get("http://attachment.icon/").isNull());
}
TEST_F(BirchItemIconTest, AttachmentLoadIconInvalidUrl) {
TEST_F(BirchItemIconTest, Attachment_LoadIcon_InvalidUrl) {
BirchAttachmentItem item(u"item",
/*file_url=*/GURL("http://file.com/"),
/*icon_url=*/GURL("invalid-url"),
@ -643,7 +643,7 @@ TEST_F(BirchItemIconTest, AttachmentLoadIconInvalidUrl) {
EXPECT_EQ(icon_cache->size_for_test(), 0u);
}
TEST_F(BirchItemIconTest, TabLoadIcon) {
TEST_F(BirchItemIconTest, Tab_LoadIcon) {
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time(),
/*favicon_url=*/GURL("http://icon.com/"),
@ -666,7 +666,7 @@ TEST_F(BirchItemIconTest, TabLoadIcon) {
EXPECT_FALSE(icon_cache->Get("http://icon.com/").isNull());
}
TEST_F(BirchItemIconTest, TabLoadIconInvalidUrl) {
TEST_F(BirchItemIconTest, Tab_LoadIcon_InvalidUrl) {
BirchTabItem item(u"item", /*url=*/GURL("http://example.com/"),
/*timestamp=*/base::Time(),
/*favicon_url=*/GURL("invalid-url"),
@ -684,7 +684,7 @@ TEST_F(BirchItemIconTest, TabLoadIconInvalidUrl) {
EXPECT_EQ(icon_cache->size_for_test(), 0u);
}
TEST_F(BirchItemIconTest, WeatherLoadIcon) {
TEST_F(BirchItemIconTest, Weather_LoadIcon) {
BirchWeatherItem item(u"item", 72.f, GURL("http://icon.com/"));
item.LoadIcon(base::BindOnce([](PrimaryIconType primary_icon_type,
@ -696,7 +696,7 @@ TEST_F(BirchItemIconTest, WeatherLoadIcon) {
}));
}
TEST_F(BirchItemIconTest, WeatherLoadIconNoIcon) {
TEST_F(BirchItemIconTest, Weather_LoadIcon_NoIcon) {
BirchWeatherItem item(u"Sunny", 72.f, GURL());
item.LoadIcon(base::BindOnce([](PrimaryIconType primary_icon_type,
@ -710,7 +710,7 @@ TEST_F(BirchItemIconTest, WeatherLoadIconNoIcon) {
}));
}
TEST_F(BirchItemIconTest, FileLoadIcon) {
TEST_F(BirchItemIconTest, File_LoadIcon) {
const std::string icon_url =
"https://drive-thirdparty.googleusercontent.com/32/type/application/"
"vnd.google-apps.document";
@ -733,7 +733,7 @@ TEST_F(BirchItemIconTest, FileLoadIcon) {
EXPECT_FALSE(icon_cache->Get(icon_url).isNull());
}
TEST_F(BirchItemIconTest, SelfShareLoadIcon) {
TEST_F(BirchItemIconTest, SelfShare_LoadIcon) {
const GURL page_url = GURL("https://www.example.com/");
BirchSelfShareItem item(
u"self share guid", u"self share tab", page_url, base::Time(),
@ -755,21 +755,21 @@ TEST_F(BirchItemIconTest, SelfShareLoadIcon) {
EXPECT_FALSE(icon_cache->Get(page_url.spec()).isNull());
}
TEST_F(BirchItemTest, LostMediaVideoConferenceSubtitle) {
TEST_F(BirchItemTest, LostMedia_VideoConference_Subtitle) {
BirchLostMediaItem item(GURL(), u"test_title", std::nullopt,
SecondaryIconType::kLostMediaVideoConference,
base::DoNothing());
EXPECT_EQ(item.subtitle(), u"Ongoing · Switch to tab");
}
TEST_F(BirchItemTest, LostMediaMediaTabSubtitle) {
TEST_F(BirchItemTest, LostMedia_MediaTab_Subtitle) {
BirchLostMediaItem item(GURL(), u"test_title", std::nullopt,
SecondaryIconType::kLostMediaVideo,
base::DoNothing());
EXPECT_EQ(item.subtitle(), u"Playing · Switch to tab");
}
TEST_F(BirchItemIconTest, LostMediaLoadIcon) {
TEST_F(BirchItemIconTest, LostMedia_LoadIcon) {
const GURL page_url = GURL("https://www.example.com/");
BirchLostMediaItem item(page_url, u"test_title", std::nullopt,
SecondaryIconType::kLostMediaVideoConference,
@ -791,7 +791,7 @@ TEST_F(BirchItemIconTest, LostMediaLoadIcon) {
EXPECT_FALSE(icon_cache->Get(page_url.spec()).isNull());
}
TEST_F(BirchItemIconTest, LastActiveLoadIcon) {
TEST_F(BirchItemIconTest, LastActive_LoadIcon) {
const GURL page_url = GURL("https://www.example.com/");
BirchLastActiveItem item(u"item", page_url, base::Time());
@ -813,7 +813,7 @@ TEST_F(BirchItemIconTest, LastActiveLoadIcon) {
EXPECT_FALSE(icon_cache->Get(page_url.spec()).isNull());
}
TEST_F(BirchItemIconTest, MostVisitedLoadIcon) {
TEST_F(BirchItemIconTest, MostVisited_LoadIcon) {
const GURL page_url = GURL("https://www.example.com/");
BirchMostVisitedItem item(u"item", page_url);

@ -728,7 +728,7 @@ TEST_F(BirchModelTest, EnableWeatherPrefDuringFetchCausesDataFetchRequest) {
}
// Regression test for missing attachment type check in IsDataFresh().
TEST_F(BirchModelTest, IsDataFreshAttachments) {
TEST_F(BirchModelTest, IsDataFresh_Attachments) {
BirchModel* model = Shell::Get()->birch_model();
ASSERT_FALSE(model->IsDataFresh());
@ -1195,7 +1195,7 @@ TEST_F(BirchModelTest, SetItemListRecordsHistogram) {
histograms.ExpectBucketCount("Ash.Birch.ResultsReturned.ReleaseNotes", 1, 1);
}
TEST_F(BirchModelTest, GetItemsForDisplayEnoughTypes) {
TEST_F(BirchModelTest, GetItemsForDisplay_EnoughTypes) {
BirchModel* model = Shell::Get()->birch_model();
// Insert two calendar items.
@ -1242,7 +1242,7 @@ TEST_F(BirchModelTest, GetItemsForDisplayEnoughTypes) {
EXPECT_EQ(items[3]->GetType(), BirchItemType::kCalendar);
}
TEST_F(BirchModelTest, GetItemsForDisplayIncludesDuplicateTypes) {
TEST_F(BirchModelTest, GetItemsForDisplay_IncludesDuplicateTypes) {
BirchModel* model = Shell::Get()->birch_model();
// Insert 2 calendar events with high priority.
@ -1285,7 +1285,7 @@ TEST_F(BirchModelTest, GetItemsForDisplayIncludesDuplicateTypes) {
EXPECT_EQ(items[4]->GetType(), BirchItemType::kFile);
}
TEST_F(BirchModelTest, GetItemsForDisplayTwoDuplicateTypes) {
TEST_F(BirchModelTest, GetItemsForDisplay_TwoDuplicateTypes) {
BirchModel* model = Shell::Get()->birch_model();
// Insert 2 items of the same type.
@ -1315,7 +1315,7 @@ TEST_F(BirchModelTest, GetItemsForDisplayTwoDuplicateTypes) {
EXPECT_EQ(items[3]->GetType(), BirchItemType::kAttachment);
}
TEST_F(BirchModelTest, GetItemsForDisplayNotEnoughItems) {
TEST_F(BirchModelTest, GetItemsForDisplay_NotEnoughItems) {
BirchModel* model = Shell::Get()->birch_model();
// Insert 3 items of the same type.
@ -1338,7 +1338,7 @@ TEST_F(BirchModelTest, GetItemsForDisplayNotEnoughItems) {
EXPECT_EQ(items[2]->GetType(), BirchItemType::kCalendar);
}
TEST_F(BirchModelTest, GetItemsForDisplayNotRankedItem) {
TEST_F(BirchModelTest, GetItemsForDisplay_NotRankedItem) {
BirchModel* model = Shell::Get()->birch_model();
// Insert 1 regular item and 1 item with no ranking.
@ -1355,7 +1355,7 @@ TEST_F(BirchModelTest, GetItemsForDisplayNotRankedItem) {
EXPECT_EQ(items[0]->GetType(), BirchItemType::kCalendar);
}
TEST_F(BirchModelTest, GetItemsForDisplayNoTitle) {
TEST_F(BirchModelTest, GetItemsForDisplay_NoTitle) {
BirchModel* model = Shell::Get()->birch_model();
// Add an item with an empty title.

@ -256,7 +256,7 @@ TEST_F(ClipboardNudgeControllerTest, ShowZeroStateNudgeAfterOngoingNudge) {
}
// Asserts that all nudge metric related histograms start at 0.
TEST_F(ClipboardNudgeControllerTest, NudgeMetricsStartAtZero) {
TEST_F(ClipboardNudgeControllerTest, NudgeMetrics_StartAtZero) {
histograms().ExpectTotalCount(kClipboardHistoryOnboardingNudgeOpenTime, 0);
histograms().ExpectTotalCount(kClipboardHistoryOnboardingNudgePasteTime, 0);
histograms().ExpectTotalCount(kClipboardHistoryZeroStateNudgeOpenTime, 0);

@ -127,7 +127,7 @@ class ArcUtilTest : public ash::AshTestBase {
TestingPrefServiceSimple profile_prefs_;
};
TEST_F(ArcUtilTest, IsArcAvailableNone) {
TEST_F(ArcUtilTest, IsArcAvailable_None) {
auto* command_line = base::CommandLine::ForCurrentProcess();
command_line->InitFromArgv({"", "--arc-availability=none"});
@ -142,7 +142,7 @@ TEST_F(ArcUtilTest, IsArcAvailableNone) {
}
// Test --arc-available with EnableARC feature combination.
TEST_F(ArcUtilTest, IsArcAvailableInstalled) {
TEST_F(ArcUtilTest, IsArcAvailable_Installed) {
auto* command_line = base::CommandLine::ForCurrentProcess();
// If ARC is not installed, IsArcAvailable() should return false,
@ -194,7 +194,7 @@ TEST_F(ArcUtilTest, IsArcAvailableInstalled) {
}
}
TEST_F(ArcUtilTest, IsArcAvailableOfficiallySupported) {
TEST_F(ArcUtilTest, IsArcAvailable_OfficiallySupported) {
// Regardless of FeatureList, IsArcAvailable() should return true.
auto* command_line = base::CommandLine::ForCurrentProcess();
command_line->InitFromArgv({"", "--enable-arc"});
@ -416,7 +416,7 @@ TEST_F(ArcUtilTest, ScaleFactorToDensity) {
EXPECT_EQ(240, GetLcdDensityForDeviceScaleFactor(2.0));
}
TEST_F(ArcUtilTest, ConfigureUpstartJobsSuccess) {
TEST_F(ArcUtilTest, ConfigureUpstartJobs_Success) {
std::deque<JobDesc> jobs{
JobDesc{"Job_2dA", UpstartOperation::JOB_STOP, {}},
JobDesc{"Job_2dB", UpstartOperation::JOB_STOP_AND_START, {}},
@ -451,7 +451,7 @@ TEST_F(ArcUtilTest, ConfigureUpstartJobsSuccess) {
EXPECT_EQ(ops[4].type, ash::FakeUpstartClient::UpstartOperationType::START);
}
TEST_F(ArcUtilTest, ConfigureUpstartJobsStopFail) {
TEST_F(ArcUtilTest, ConfigureUpstartJobs_StopFail) {
std::deque<JobDesc> jobs{
JobDesc{"Job_2dA", UpstartOperation::JOB_STOP, {}},
JobDesc{"Job_2dB", UpstartOperation::JOB_STOP_AND_START, {}},
@ -484,7 +484,7 @@ TEST_F(ArcUtilTest, ConfigureUpstartJobsStopFail) {
EXPECT_TRUE(result);
}
TEST_F(ArcUtilTest, ConfigureUpstartJobsStartFail) {
TEST_F(ArcUtilTest, ConfigureUpstartJobs_StartFail) {
std::deque<JobDesc> jobs{
JobDesc{"Job_2dA", UpstartOperation::JOB_STOP, {}},
JobDesc{"Job_2dB", UpstartOperation::JOB_STOP_AND_START, {}},
@ -601,7 +601,7 @@ TEST_F(ArcUtilTest, SetAndGetArcVmDataMigrationStrategy) {
// Tests that ShouldUseVirtioBlkData() returns true when virtio-blk /data is
// enabled via the kEnableVirtioBlkForData feature.
TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataVirtioBlkForDataFeatureEnabled) {
TEST_F(ArcUtilTest, ShouldUseVirtioBlkData_VirtioBlkForDataFeatureEnabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableVirtioBlkForData);
EXPECT_FALSE(base::FeatureList::IsEnabled(kEnableArcVmDataMigration));
@ -610,7 +610,7 @@ TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataVirtioBlkForDataFeatureEnabled) {
// Tests that ShouldUseVirtioBlkData() returns false when ARCVM /data is enabled
// but the user has not been notified yet.
TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationUnnotified) {
TEST_F(ArcUtilTest, ShouldUseVirtioBlkData_ArcVmDataMigration_Unnotified) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableArcVmDataMigration);
SetArcVmDataMigrationStatus(profile_prefs(),
@ -620,7 +620,7 @@ TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationUnnotified) {
// Tests that ShouldUseVirtioBlkData() returns false when ARCVM /data is enabled
// but the user has just been notified of its availability.
TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationNotified) {
TEST_F(ArcUtilTest, ShouldUseVirtioBlkData_ArcVmDataMigration_Notified) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableArcVmDataMigration);
SetArcVmDataMigrationStatus(profile_prefs(),
@ -630,7 +630,7 @@ TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationNotified) {
// Tests that ShouldUseVirtioBlkData() returns false when ARCVM /data is enabled
// but the user has just confirmed the migration.
TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationConfirmed) {
TEST_F(ArcUtilTest, ShouldUseVirtioBlkData_ArcVmDataMigration_Confirmed) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableArcVmDataMigration);
SetArcVmDataMigrationStatus(profile_prefs(),
@ -640,7 +640,7 @@ TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationConfirmed) {
// Tests that ShouldUseVirtioBlkData() returns false when ARCVM /data is enabled
// and the migration has started, but not finished yet.
TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationStarted) {
TEST_F(ArcUtilTest, ShouldUseVirtioBlkData_ArcVmDataMigration_Started) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableArcVmDataMigration);
SetArcVmDataMigrationStatus(profile_prefs(),
@ -650,7 +650,7 @@ TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationStarted) {
// Tests that ShouldUseVirtioBlkData() returns true when ARCVM /data is enabled
// and the migration has finished.
TEST_F(ArcUtilTest, ShouldUseVirtioBlkDataArcVmDataMigrationFinished) {
TEST_F(ArcUtilTest, ShouldUseVirtioBlkData_ArcVmDataMigration_Finished) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableArcVmDataMigration);
SetArcVmDataMigrationStatus(profile_prefs(),
@ -676,7 +676,7 @@ TEST_F(ArcUtilTest,
// Tests that GetDaysUntilArcVmDataMigrationDeadline() returns the correct value
// when it is called after kArcVmDataMigrationDismissibleTimeDelta has passed.
TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadlineJustAfterDeadline) {
TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadline_JustAfterDeadline) {
// Remaining days should be 1 (i.e., the migration should be done today).
profile_prefs()->SetTime(
prefs::kArcVmDataMigrationNotificationFirstShownTime,
@ -687,7 +687,7 @@ TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadlineJustAfterDeadline) {
// Tests that GetDaysUntilArcVmDataMigrationDeadline() returns the correct value
// when it is called after more days than kArcVmDataMigrationDismissibleDays
// have passed.
TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadlineOverdue) {
TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadline_Overdue) {
// Remaining days should be kept 1.
profile_prefs()->SetTime(
prefs::kArcVmDataMigrationNotificationFirstShownTime,
@ -698,7 +698,7 @@ TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadlineOverdue) {
// Tests that GetDaysUntilArcVmDataMigrationDeadline() returns the correct value
// when the migration is in progress.
TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadlineMigrationStarted) {
TEST_F(ArcUtilTest, GetDaysUntilArcVmDataMigrationDeadline_MigrationStarted) {
SetArcVmDataMigrationStatus(profile_prefs(),
ArcVmDataMigrationStatus::kStarted);
profile_prefs()->SetTime(prefs::kArcVmDataMigrationNotificationFirstShownTime,
@ -751,7 +751,7 @@ TEST_F(ArcUtilTest, GetRequiredFreeDiskSpaceForArcVmDataMigrationInBytes) {
}
// Checks that the callback is invoked with false when ARCVM is not stopped.
TEST_F(ArcUtilTest, EnsureStaleArcVmAndArcVmUpstartJobsStoppedStopVmFailure) {
TEST_F(ArcUtilTest, EnsureStaleArcVmAndArcVmUpstartJobsStopped_StopVmFailure) {
ash::FakeConciergeClient::Get()->set_stop_vm_response(std::nullopt);
base::test::TestFuture<bool> future_no_response;
EnsureStaleArcVmAndArcVmUpstartJobsStopped("0123456789abcdef",
@ -771,7 +771,7 @@ TEST_F(ArcUtilTest, EnsureStaleArcVmAndArcVmUpstartJobsStoppedStopVmFailure) {
// StopJob() is called for each of `kArcVmUpstartJobsToBeStoppedOnRestart`.
// Note that StopJob() failures are not treated as fatal; see the comment on
// ConfigureUpstartJobs().
TEST_F(ArcUtilTest, EnsureStaleArcVmAndArcVmUpstartJobsStoppedSuccess) {
TEST_F(ArcUtilTest, EnsureStaleArcVmAndArcVmUpstartJobsStopped_Success) {
std::set<std::string> jobs_to_be_stopped(
std::begin(kArcVmUpstartJobsToBeStoppedOnRestart),
std::end(kArcVmUpstartJobsToBeStoppedOnRestart));

@ -70,7 +70,7 @@ TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyJelly) {
EXPECT_TRUE(instance()->flags_called_value()->jelly_colors);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowCompatEnabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowCompat_Enabled) {
scoped_feature_list()->InitAndEnableFeature(kRoundedWindowCompat);
Connect();
EXPECT_EQ(instance()->flags_called_value()->rounded_window_compat_strategy,
@ -98,14 +98,14 @@ TEST_F(ArcChromeFeatureFlagsBridgeTest,
mojom::RoundedWindowCompatStrategy::kLeftRightBottomGesture);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowCompatDisabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowCompat_Disabled) {
scoped_feature_list()->InitAndDisableFeature(kRoundedWindowCompat);
Connect();
EXPECT_EQ(instance()->flags_called_value()->rounded_window_compat_strategy,
mojom::RoundedWindowCompatStrategy::kDisabled);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowsEnabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindows_Enabled) {
scoped_feature_list()->InitWithFeaturesAndParameters(
{{chromeos::features::kFeatureManagementRoundedWindows, {}},
{chromeos::features::kRoundedWindows,
@ -115,52 +115,52 @@ TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowsEnabled) {
EXPECT_EQ(instance()->flags_called_value()->rounded_window_radius, 8);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindowsDisabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyRoundedWindows_Disabled) {
scoped_feature_list()->InitAndDisableFeature(
chromeos::features::kRoundedWindows);
Connect();
EXPECT_EQ(instance()->flags_called_value()->rounded_window_radius, 0);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyPipDoubleTapToResizeEnabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyPipDoubleTapToResize_Enabled) {
scoped_feature_list()->InitAndEnableFeature(
ash::features::kPipDoubleTapToResize);
Connect();
EXPECT_TRUE(instance()->flags_called_value()->enable_pip_double_tap);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyPipDoubleTapToResizeDisabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyPipDoubleTapToResize_Disabled) {
scoped_feature_list()->InitAndDisableFeature(
ash::features::kPipDoubleTapToResize);
Connect();
EXPECT_FALSE(instance()->flags_called_value()->enable_pip_double_tap);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyResizeCompatEnabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyResizeCompat_Enabled) {
scoped_feature_list()->InitAndEnableFeature(arc::kResizeCompat);
Connect();
EXPECT_TRUE(instance()->flags_called_value()->resize_compat);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyResizeCompatDisabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyResizeCompat_Disabled) {
scoped_feature_list()->InitAndDisableFeature(arc::kResizeCompat);
Connect();
EXPECT_FALSE(instance()->flags_called_value()->resize_compat);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyExtendIntentAnrTimeoutEnabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyExtendIntentAnrTimeout_Enabled) {
scoped_feature_list()->InitAndEnableFeature(arc::kExtendIntentAnrTimeout);
Connect();
EXPECT_TRUE(instance()->flags_called_value()->extend_intent_anr_timeout);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyExtendIntentAnrTimeoutDisabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyExtendIntentAnrTimeout_Disabled) {
scoped_feature_list()->InitAndDisableFeature(arc::kExtendIntentAnrTimeout);
Connect();
EXPECT_FALSE(instance()->flags_called_value()->extend_intent_anr_timeout);
}
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyExtendServiceAnrTimeoutEnabled) {
TEST_F(ArcChromeFeatureFlagsBridgeTest, NotifyExtendServiceAnrTimeout_Enabled) {
scoped_feature_list()->InitAndEnableFeature(arc::kExtendServiceAnrTimeout);
Connect();
EXPECT_TRUE(instance()->flags_called_value()->extend_service_anr_timeout);

@ -78,7 +78,7 @@ class ArcDiskSpaceBridgeTest : public testing::Test {
std::unique_ptr<ArcDiskSpaceBridge> bridge_;
};
TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupportedSupported) {
TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupported_Supported) {
ash::FakeSpacedClient::Get()->set_quota_supported(true);
ash::FakeUserDataAuthClient::TestApi::Get()->set_arc_quota_supported(true);
@ -87,7 +87,7 @@ TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupportedSupported) {
EXPECT_TRUE(future.Get());
}
TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupportedNotSupportedInSpaced) {
TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupported_NotSupportedInSpaced) {
ash::FakeSpacedClient::Get()->set_quota_supported(false);
ash::FakeUserDataAuthClient::TestApi::Get()->set_arc_quota_supported(true);
@ -96,7 +96,7 @@ TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupportedNotSupportedInSpaced) {
EXPECT_FALSE(future.Get());
}
TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupportedNotSupportedInCryptohome) {
TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupported_NotSupportedInCryptohome) {
ash::FakeSpacedClient::Get()->set_quota_supported(true);
ash::FakeUserDataAuthClient::TestApi::Get()->set_arc_quota_supported(false);
@ -105,7 +105,7 @@ TEST_F(ArcDiskSpaceBridgeTest, IsQuotaSupportedNotSupportedInCryptohome) {
EXPECT_FALSE(future.Get());
}
TEST_F(ArcDiskSpaceBridgeTest, GetQuotaCurrentSpaceForGidSuccess) {
TEST_F(ArcDiskSpaceBridgeTest, GetQuotaCurrentSpaceForGid_Success) {
const std::vector<std::pair<uint32_t, int64_t>>
valid_android_gid_and_expected_space = {
{kAndroidGidStart, 100},
@ -124,7 +124,7 @@ TEST_F(ArcDiskSpaceBridgeTest, GetQuotaCurrentSpaceForGidSuccess) {
}
}
TEST_F(ArcDiskSpaceBridgeTest, GetQuotaCurrentSpaceForGidInvalidId) {
TEST_F(ArcDiskSpaceBridgeTest, GetQuotaCurrentSpaceForGid_InvalidId) {
constexpr uint32_t kInvalidAndroidGid = kAndroidGidEnd + 1;
base::test::TestFuture<int64_t> future;

@ -61,7 +61,7 @@ TEST_F(ArcMemoryBridgeTest, DropCaches) {
}
// Tests that DropCaches runs the callback with a proper result.
TEST_F(ArcMemoryBridgeTest, DropCachesFail) {
TEST_F(ArcMemoryBridgeTest, DropCaches_Fail) {
// Inject failure.
memory_instance()->set_drop_caches_result(false);
@ -73,7 +73,7 @@ TEST_F(ArcMemoryBridgeTest, DropCachesFail) {
}
// Tests that DropCaches runs the callback with a proper result.
TEST_F(ArcMemoryBridgeTest, DropCachesNoInstance) {
TEST_F(ArcMemoryBridgeTest, DropCaches_NoInstance) {
// Inject failure.
ArcServiceManager::Get()->arc_bridge_service()->memory()->CloseInstance(
memory_instance());
@ -87,7 +87,7 @@ TEST_F(ArcMemoryBridgeTest, DropCachesNoInstance) {
// Tests that Reclaim runs the callback with memory reclaimed from all
// processes successfully.
TEST_F(ArcMemoryBridgeTest, ReclaimAllSuccess) {
TEST_F(ArcMemoryBridgeTest, Reclaim_All_Success) {
memory_instance()->set_reclaim_all_result(100, 0);
std::optional<uint32_t> reclaimed_result;
@ -107,7 +107,7 @@ TEST_F(ArcMemoryBridgeTest, ReclaimAllSuccess) {
// Tests that Reclaim runs the callback with memory reclaimed from some
// processes successfully.
TEST_F(ArcMemoryBridgeTest, ReclaimPartialSuccess) {
TEST_F(ArcMemoryBridgeTest, Reclaim_Partial_Success) {
memory_instance()->set_reclaim_all_result(50, 50);
std::optional<uint32_t> reclaimed_result;
@ -127,7 +127,7 @@ TEST_F(ArcMemoryBridgeTest, ReclaimPartialSuccess) {
// Tests that Reclaim runs the callback with memory reclaimed from some
// processes successfully when anon pages are requested.
TEST_F(ArcMemoryBridgeTest, ReclaimAnonPartialSuccess) {
TEST_F(ArcMemoryBridgeTest, Reclaim_Anon_Partial_Success) {
memory_instance()->set_reclaim_anon_result(10, 10);
std::optional<uint32_t> reclaimed_result;
@ -146,7 +146,7 @@ TEST_F(ArcMemoryBridgeTest, ReclaimAnonPartialSuccess) {
}
// Tests that Reclaim runs the callback with the instance not available.
TEST_F(ArcMemoryBridgeTest, ReclaimNoInstance) {
TEST_F(ArcMemoryBridgeTest, Reclaim_NoInstance) {
// Inject failure.
ArcServiceManager::Get()->arc_bridge_service()->memory()->CloseInstance(
memory_instance());

@ -168,7 +168,7 @@ class ArcMetricsServiceTest : public testing::Test {
};
// Tests that ReportBootProgress() actually records UMA stats.
TEST_F(ArcMetricsServiceTest, ReportBootProgressFirstBoot) {
TEST_F(ArcMetricsServiceTest, ReportBootProgress_FirstBoot) {
// Start the full ARC container at t=10. Also set boot_progress_start to 10,
// boot_progress_preload_start to 11, and so on.
constexpr uint64_t kArcStartTimeMs = 10;
@ -187,7 +187,7 @@ TEST_F(ArcMetricsServiceTest, ReportBootProgressFirstBoot) {
}
// Does the same but with negative values and FIRST_BOOT_AFTER_UPDATE.
TEST_F(ArcMetricsServiceTest, ReportBootProgressFirstBootAfterUpdate) {
TEST_F(ArcMetricsServiceTest, ReportBootProgress_FirstBootAfterUpdate) {
// Start the full ARC container at t=10. Also set boot_progress_start to 5,
// boot_progress_preload_start to 7, and so on. This can actually happen
// because the mini container can finish up to boot_progress_preload_end
@ -211,7 +211,7 @@ TEST_F(ArcMetricsServiceTest, ReportBootProgressFirstBootAfterUpdate) {
}
// Does the same but with REGULAR_BOOT.
TEST_F(ArcMetricsServiceTest, ReportBootProgressRegularBoot) {
TEST_F(ArcMetricsServiceTest, ReportBootProgress_RegularBoot) {
constexpr uint64_t kArcStartTimeMs = 10;
SetArcStartTimeInMs(kArcStartTimeMs);
std::vector<mojom::BootProgressEventPtr> events(
@ -225,7 +225,7 @@ TEST_F(ArcMetricsServiceTest, ReportBootProgressRegularBoot) {
}
// Tests that no UMA is recorded when nothing is reported.
TEST_F(ArcMetricsServiceTest, ReportBootProgressEmptyResults) {
TEST_F(ArcMetricsServiceTest, ReportBootProgress_EmptyResults) {
SetArcStartTimeInMs(100);
std::vector<mojom::BootProgressEventPtr> events; // empty
@ -236,7 +236,7 @@ TEST_F(ArcMetricsServiceTest, ReportBootProgressEmptyResults) {
}
// Tests that no UMA is recorded when BootType is invalid.
TEST_F(ArcMetricsServiceTest, ReportBootProgressInvalidBootType) {
TEST_F(ArcMetricsServiceTest, ReportBootProgress_InvalidBootType) {
SetArcStartTimeInMs(100);
std::vector<mojom::BootProgressEventPtr> events(
GetBootProgressEvents(123, 456));
@ -347,7 +347,7 @@ TEST_F(ArcMetricsServiceTest, GetArcStartTimeFromEvents) {
}));
}
TEST_F(ArcMetricsServiceTest, GetArcStartTimeFromEventsNoArcUpgradedEvent) {
TEST_F(ArcMetricsServiceTest, GetArcStartTimeFromEvents_NoArcUpgradedEvent) {
constexpr uint64_t kArcStartTimeMs = 10;
std::vector<mojom::BootProgressEventPtr> events(
GetBootProgressEvents(kArcStartTimeMs, 1 /* step_in_ms */));
@ -395,7 +395,7 @@ TEST_F(ArcMetricsServiceTest, BootTypeObserver) {
service()->RemoveBootTypeObserver(&observer);
}
TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStartedNoUsageReported) {
TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStarted_NoUsageReported) {
base::HistogramTester tester;
service()->OnArcSessionStopped();
@ -404,7 +404,7 @@ TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStartedNoUsageReported) {
static_cast<base::HistogramBase::Sample>(0), 1);
}
TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStartedOneUsageReported) {
TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStarted_OneUsageReported) {
base::HistogramTester tester;
service()->ReportWebViewProcessStarted();
@ -414,7 +414,7 @@ TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStartedOneUsageReported) {
static_cast<base::HistogramBase::Sample>(1), 1);
}
TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStartedSomeUsageReported) {
TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStarted_SomeUsageReported) {
base::HistogramTester tester;
// 3 sessions with webview reported in 2 sessions.
@ -432,7 +432,7 @@ TEST_F(ArcMetricsServiceTest, ReportWebViewProcessStartedSomeUsageReported) {
static_cast<base::HistogramBase::Sample>(1), 2);
}
TEST_F(ArcMetricsServiceTest, ReportArcKeyMintErrorSomeErrorReported) {
TEST_F(ArcMetricsServiceTest, ReportArcKeyMintError_SomeErrorReported) {
base::HistogramTester tester;
service()->ReportArcKeyMintError(arc::mojom::ArcKeyMintError::kUnknownError);

@ -150,7 +150,7 @@ class ArcNetHostImplTest : public testing::Test {
std::unique_ptr<ash::NetworkHandlerTestHelper> helper_;
};
TEST_F(ArcNetHostImplTest, SetAlwaysOnVpnSetPackage) {
TEST_F(ArcNetHostImplTest, SetAlwaysOnVpn_SetPackage) {
EXPECT_EQ(false, pref_service()->GetBoolean(prefs::kAlwaysOnVpnLockdown));
EXPECT_EQ("", pref_service()->GetString(prefs::kAlwaysOnVpnPackage));

@ -50,7 +50,7 @@ TEST_F(ArcClientAdapterTest, ConstructDestruct) {
adapter_observation.Observe(adapter.get());
}
TEST_F(ArcClientAdapterTest, ConstructDestructWithARCVM) {
TEST_F(ArcClientAdapterTest, ConstructDestruct_WithARCVM) {
auto* command_line = base::CommandLine::ForCurrentProcess();
command_line->InitFromArgv({"", "--enable-arcvm"});
ASSERT_TRUE(IsArcVmEnabled());

@ -122,7 +122,7 @@ TEST_F(ArcContainerClientAdapterTest,
EXPECT_FALSE(child_observer.stopped_called());
}
TEST_F(ArcContainerClientAdapterTest, StartArcDisableMediaStoreMaintenance) {
TEST_F(ArcContainerClientAdapterTest, StartArc_DisableMediaStoreMaintenance) {
StartParams start_params;
start_params.disable_media_store_maintenance = true;
client_adapter()->StartMiniArc(std::move(start_params),
@ -133,7 +133,7 @@ TEST_F(ArcContainerClientAdapterTest, StartArcDisableMediaStoreMaintenance) {
EXPECT_TRUE(request.disable_media_store_maintenance());
}
TEST_F(ArcContainerClientAdapterTest, StartArcDisableDownloadProviderDefault) {
TEST_F(ArcContainerClientAdapterTest, StartArc_DisableDownloadProviderDefault) {
StartParams start_params;
client_adapter()->StartMiniArc(std::move(start_params),
base::BindOnce(&OnMiniInstanceStarted));
@ -143,7 +143,7 @@ TEST_F(ArcContainerClientAdapterTest, StartArcDisableDownloadProviderDefault) {
EXPECT_FALSE(request.disable_download_provider());
}
TEST_F(ArcContainerClientAdapterTest, StartArcDisableDownloadProviderOn) {
TEST_F(ArcContainerClientAdapterTest, StartArc_DisableDownloadProviderOn) {
StartParams start_params;
start_params.disable_download_provider = true;
client_adapter()->StartMiniArc(std::move(start_params),
@ -154,7 +154,7 @@ TEST_F(ArcContainerClientAdapterTest, StartArcDisableDownloadProviderOn) {
EXPECT_TRUE(request.disable_download_provider());
}
TEST_F(ArcContainerClientAdapterTest, StartArcDoNotUseDevCachesByDefault) {
TEST_F(ArcContainerClientAdapterTest, StartArc_DoNotUseDevCachesByDefault) {
StartParams start_params;
client_adapter()->StartMiniArc(std::move(start_params),
base::BindOnce(&OnMiniInstanceStarted));
@ -164,7 +164,7 @@ TEST_F(ArcContainerClientAdapterTest, StartArcDoNotUseDevCachesByDefault) {
EXPECT_FALSE(request.use_dev_caches());
}
TEST_F(ArcContainerClientAdapterTest, StartArcUseDevCachesSet) {
TEST_F(ArcContainerClientAdapterTest, StartArc_UseDevCachesSet) {
StartParams start_params;
start_params.use_dev_caches = true;
client_adapter()->StartMiniArc(std::move(start_params),
@ -175,7 +175,7 @@ TEST_F(ArcContainerClientAdapterTest, StartArcUseDevCachesSet) {
EXPECT_TRUE(request.use_dev_caches());
}
TEST_F(ArcContainerClientAdapterTest, StartArcArcSignedInDefault) {
TEST_F(ArcContainerClientAdapterTest, StartArc_ArcSignedInDefault) {
StartParams start_params;
client_adapter()->StartMiniArc(std::move(start_params),
base::BindOnce(&OnMiniInstanceStarted));
@ -185,7 +185,7 @@ TEST_F(ArcContainerClientAdapterTest, StartArcArcSignedInDefault) {
EXPECT_FALSE(request.arc_signed_in());
}
TEST_F(ArcContainerClientAdapterTest, StartrcArcSignedIn) {
TEST_F(ArcContainerClientAdapterTest, Startrc_ArcSignedIn) {
StartParams start_params;
start_params.arc_signed_in = true;
client_adapter()->StartMiniArc(std::move(start_params),
@ -217,7 +217,7 @@ TEST_F(ArcContainerClientAdapterTest, ArcTTSCachingEnabled) {
EXPECT_TRUE(request.enable_tts_caching());
}
TEST_F(ArcContainerClientAdapterTest, ConvertUpgradeParamsSkipTtsCacheSetup) {
TEST_F(ArcContainerClientAdapterTest, ConvertUpgradeParams_SkipTtsCacheSetup) {
UpgradeParams upgrade_params;
upgrade_params.skip_tts_cache = true;
client_adapter()->UpgradeArc(std::move(upgrade_params),
@ -238,7 +238,7 @@ TEST_F(ArcContainerClientAdapterTest,
EXPECT_FALSE(upgrade_request.skip_tts_cache());
}
TEST_F(ArcContainerClientAdapterTest, StartArcEnableArcAttestationDefault) {
TEST_F(ArcContainerClientAdapterTest, StartArc_EnableArcAttestationDefault) {
StartParams start_params;
client_adapter()->StartMiniArc(std::move(start_params),
base::BindOnce(&OnMiniInstanceStarted));

@ -374,7 +374,7 @@ class ArcSessionImplTest : public testing::Test {
};
// Starting mini container success case.
TEST_F(ArcSessionImplTest, MiniInstanceSuccess) {
TEST_F(ArcSessionImplTest, MiniInstance_Success) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
arc_session->StartMiniInstance();
@ -387,7 +387,7 @@ TEST_F(ArcSessionImplTest, MiniInstanceSuccess) {
// ArcClientAdapter::StartMiniArc() reports an error, causing the mini instance
// start to fail.
TEST_F(ArcSessionImplTest, MiniInstanceDBusFail) {
TEST_F(ArcSessionImplTest, MiniInstance_DBusFail) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
GetClient(arc_session.get())->set_arc_available(false);
@ -405,7 +405,7 @@ TEST_F(ArcSessionImplTest, MiniInstanceDBusFail) {
// ArcClientAdapter::UpgradeArc() reports an error due to low disk,
// causing the container upgrade to fail to start container with reason
// LOW_DISK_SPACE.
TEST_F(ArcSessionImplTest, UpgradeLowDisk) {
TEST_F(ArcSessionImplTest, Upgrade_LowDisk) {
auto delegate = std::make_unique<FakeDelegate>();
delegate->SetFreeDiskSpace(kMinimumFreeDiskSpaceBytes / 2);
@ -429,7 +429,7 @@ TEST_F(ArcSessionImplTest, UpgradeLowDisk) {
}
// Upgrading a mini container to a full container. Success case.
TEST_F(ArcSessionImplTest, UpgradeSuccess) {
TEST_F(ArcSessionImplTest, Upgrade_Success) {
// Set up. Start a mini instance.
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
@ -445,7 +445,7 @@ TEST_F(ArcSessionImplTest, UpgradeSuccess) {
}
// ArcClientAdapter::UpgradeArc() reports an error, then the upgrade fails.
TEST_F(ArcSessionImplTest, UpgradeDBusFail) {
TEST_F(ArcSessionImplTest, Upgrade_DBusFail) {
// Set up. Start a mini instance.
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
@ -467,7 +467,7 @@ TEST_F(ArcSessionImplTest, UpgradeDBusFail) {
}
// Mojo connection fails on upgrading. Then, the upgrade fails.
TEST_F(ArcSessionImplTest, UpgradeMojoConnectionFail) {
TEST_F(ArcSessionImplTest, Upgrade_MojoConnectionFail) {
// Let Mojo connection fail.
auto delegate = std::make_unique<FakeDelegate>();
delegate->EmulateMojoConnectionFailure();
@ -493,7 +493,7 @@ TEST_F(ArcSessionImplTest, UpgradeMojoConnectionFail) {
// Calling UpgradeArcContainer() during STARTING_MINI_INSTANCE should eventually
// succeed to run a full container.
TEST_F(ArcSessionImplTest, UpgradeStartingMiniInstance) {
TEST_F(ArcSessionImplTest, Upgrade_StartingMiniInstance) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
arc_session->StartMiniInstance();
@ -516,7 +516,7 @@ TEST_F(ArcSessionImplTest, UpgradeStartingMiniInstance) {
}
// Testing stop during START_MINI_INSTANCE.
TEST_F(ArcSessionImplTest, StopStartingMiniInstance) {
TEST_F(ArcSessionImplTest, Stop_StartingMiniInstance) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
arc_session->StartMiniInstance();
@ -535,7 +535,7 @@ TEST_F(ArcSessionImplTest, StopStartingMiniInstance) {
}
// Testing stop during RUNNING_MINI_INSTANCE.
TEST_F(ArcSessionImplTest, StopRunningMiniInstance) {
TEST_F(ArcSessionImplTest, Stop_RunningMiniInstance) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
arc_session->StartMiniInstance();
@ -555,7 +555,7 @@ TEST_F(ArcSessionImplTest, StopRunningMiniInstance) {
}
// Testing stop during STARTING_FULL_INSTANCE for upgrade.
TEST_F(ArcSessionImplTest, StopStartingFullInstanceForUpgrade) {
TEST_F(ArcSessionImplTest, Stop_StartingFullInstanceForUpgrade) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
// Start mini container.
@ -579,7 +579,7 @@ TEST_F(ArcSessionImplTest, StopStartingFullInstanceForUpgrade) {
}
// Testing stop during CONNECTING_MOJO for upgrade.
TEST_F(ArcSessionImplTest, StopConnectingMojoForUpgrade) {
TEST_F(ArcSessionImplTest, Stop_ConnectingMojoForUpgrade) {
// Let Mojo connection suspend.
auto delegate = std::make_unique<FakeDelegate>();
delegate->SuspendMojoConnection();
@ -609,7 +609,7 @@ TEST_F(ArcSessionImplTest, StopConnectingMojoForUpgrade) {
}
// Testing stop during RUNNING_FULL_INSTANCE after upgrade.
TEST_F(ArcSessionImplTest, StopRunningFullInstanceForUpgrade) {
TEST_F(ArcSessionImplTest, Stop_RunningFullInstanceForUpgrade) {
auto arc_session = CreateArcSession();
TestArcSessionObserver observer(arc_session.get());
// Start mini container.
@ -861,7 +861,7 @@ TEST_F(ArcSessionImplTest, ShutdownWhileWaitingForNumCores) {
}
// Test that correct value false for managed sideloading is passed
TEST_F(ArcSessionImplTest, CanChangeAdbSideloadingFalse) {
TEST_F(ArcSessionImplTest, CanChangeAdbSideloading_False) {
auto arc_session = CreateArcSession();
adb_sideloading_availability_delegate_->SetCanChangeAdbSideloading(false);
@ -875,7 +875,7 @@ TEST_F(ArcSessionImplTest, CanChangeAdbSideloadingFalse) {
}
// Test that correct value true for managed sideloading is passed
TEST_F(ArcSessionImplTest, CanChangeAdbSideloadingTrue) {
TEST_F(ArcSessionImplTest, CanChangeAdbSideloading_True) {
auto arc_session = CreateArcSession();
adb_sideloading_availability_delegate_->SetCanChangeAdbSideloading(true);

@ -199,7 +199,7 @@ TEST_F(ArcSessionRunnerTest, StopMidStartup) {
}
// Does the same for mini instance.
TEST_F(ArcSessionRunnerTest, StopMidStartupMiniInstance) {
TEST_F(ArcSessionRunnerTest, StopMidStartup_MiniInstance) {
ResetArcSessionFactory(
base::BindRepeating(&ArcSessionRunnerTest::CreateSuspendedArcSession));
arc_session_runner()->ResumeRunner();
@ -227,7 +227,7 @@ TEST_F(ArcSessionRunnerTest, ExpansionPending) {
}
// Does the same test with a full instance.
TEST_F(ArcSessionRunnerTest, ExpansionPendingFullInstance) {
TEST_F(ArcSessionRunnerTest, ExpansionPending_FullInstance) {
EXPECT_FALSE(arc_session());
arc_session_runner()->RequestStartMiniInstance();
EXPECT_FALSE(arc_session());
@ -240,7 +240,7 @@ TEST_F(ArcSessionRunnerTest, ExpansionPendingFullInstance) {
}
// Checks the case where RequestStop() is called before resume.
TEST_F(ArcSessionRunnerTest, ExpansionPendingStopMidStartup) {
TEST_F(ArcSessionRunnerTest, ExpansionPending_StopMidStartup) {
EXPECT_FALSE(arc_session());
arc_session_runner()->RequestStartMiniInstance();
EXPECT_FALSE(arc_session());
@ -267,7 +267,7 @@ TEST_F(ArcSessionRunnerTest, BootFailure) {
}
// Does the same with the mini instance.
TEST_F(ArcSessionRunnerTest, BootFailureMiniInstance) {
TEST_F(ArcSessionRunnerTest, BootFailure_MiniInstance) {
ResetArcSessionFactory(
base::BindRepeating(&ArcSessionRunnerTest::CreateBootFailureArcSession,
ArcStopReason::GENERIC_BOOT_FAILURE));
@ -292,7 +292,7 @@ TEST_F(ArcSessionRunnerTest, BootFailureMiniInstance) {
// Similary, CRASH should do same for GENERIC_BOOT_FAILURE case, because
// in mini instance, Mojo connection should not be established.
TEST_F(ArcSessionRunnerTest, CrashMiniInstance) {
TEST_F(ArcSessionRunnerTest, Crash_MiniInstance) {
ResetArcSessionFactory(
base::BindRepeating(&ArcSessionRunnerTest::CreateBootFailureArcSession,
ArcStopReason::CRASH));
@ -401,7 +401,7 @@ TEST_F(ArcSessionRunnerTest, RemoveUnknownObserver) {
}
// Tests UMA recording on mini instance -> full instance -> shutdown case.
TEST_F(ArcSessionRunnerTest, UmaRecordingStartUpgradeShutdown) {
TEST_F(ArcSessionRunnerTest, UmaRecording_StartUpgradeShutdown) {
base::HistogramTester tester;
arc_session_runner()->ResumeRunner();
@ -421,7 +421,7 @@ TEST_F(ArcSessionRunnerTest, UmaRecordingStartUpgradeShutdown) {
}
// Tests UMA recording on full instance -> shutdown case.
TEST_F(ArcSessionRunnerTest, UmaRecordingStartShutdown) {
TEST_F(ArcSessionRunnerTest, UmaRecording_StartShutdown) {
base::HistogramTester tester;
arc_session_runner()->ResumeRunner();
@ -435,7 +435,7 @@ TEST_F(ArcSessionRunnerTest, UmaRecordingStartShutdown) {
// Tests UMA recording on mini instance -> full instance -> crash -> shutdown
// case.
TEST_F(ArcSessionRunnerTest, UmaRecordingCrashTwice) {
TEST_F(ArcSessionRunnerTest, UmaRecording_CrashTwice) {
base::HistogramTester tester;
arc_session_runner()->ResumeRunner();
@ -466,7 +466,7 @@ TEST_F(ArcSessionRunnerTest, UmaRecordingCrashTwice) {
}
// Tests UMA recording on mini instance -> crash -> shutdown case.
TEST_F(ArcSessionRunnerTest, UmaRecordingCrashMini) {
TEST_F(ArcSessionRunnerTest, UmaRecording_CrashMini) {
base::HistogramTester tester;
arc_session_runner()->ResumeRunner();
@ -486,7 +486,7 @@ TEST_F(ArcSessionRunnerTest, UmaRecordingCrashMini) {
}
// Tests UMA recording on mini instance -> boot fail -> shutdown case.
TEST_F(ArcSessionRunnerTest, UmaRecordingBootFail) {
TEST_F(ArcSessionRunnerTest, UmaRecording_BootFail) {
base::HistogramTester tester;
arc_session_runner()->ResumeRunner();
@ -505,7 +505,7 @@ TEST_F(ArcSessionRunnerTest, UmaRecordingBootFail) {
}
// Tests UMA recording on full instance -> low disk -> shutdown case.
TEST_F(ArcSessionRunnerTest, UmaRecordingLowDisk) {
TEST_F(ArcSessionRunnerTest, UmaRecording_LowDisk) {
base::HistogramTester tester;
arc_session_runner()->ResumeRunner();

@ -701,7 +701,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcEmptyUserIdHash) {
}
// Tests that StartMiniArc() still succeeds without the feature.
TEST_F(ArcVmClientAdapterTest, StartMiniArcWithPerVCpuCoreScheduling) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_WithPerVCpuCoreScheduling) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatureState(kEnablePerVmCoreScheduling,
false /* use */);
@ -714,7 +714,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcWithPerVCpuCoreScheduling) {
// Tests that StartMiniArc() still succeeds even when Upstart fails to stop
// the arcvm-post-login-services job.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStopArcVmPostLoginServicesJobFail) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StopArcVmPostLoginServicesJobFail) {
// Inject failure to FakeUpstartClient.
InjectUpstartStopJobFailure(kArcVmPostLoginServicesJobName);
@ -739,7 +739,7 @@ TEST_F(ArcVmClientAdapterTest,
// Tests that StartMiniArc() still succeeds even when Upstart fails to stop
// arcvm-data-migrator.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStopArcVmDataMigratorJobFail) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StopArcVmDataMigratorJobFail) {
// Inject failure to FakeUpstartClient.
InjectUpstartStopJobFailure(kArcVmDataMigratorJobName);
@ -750,7 +750,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStopArcVmDataMigratorJobFail) {
}
// Tests that StartMiniArc() fails when Upstart fails to start the job.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmPerBoardFeaturesJobFail) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StartArcVmPerBoardFeaturesJobFail) {
// Inject failure to FakeUpstartClient.
InjectUpstartStartJobFailure(kArcVmPerBoardFeaturesJobName);
@ -762,7 +762,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmPerBoardFeaturesJobFail) {
// Tests that StartMiniArc() fails if Upstart fails to start
// arcvm-pre-login-services.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmPreLoginServicesJobFail) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StartArcVmPreLoginServicesJobFail) {
// Inject failure to FakeUpstartClient.
InjectUpstartStartJobFailure(kArcVmPreLoginServicesJobName);
@ -772,7 +772,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmPreLoginServicesJobFail) {
// Tests that StartMiniArc() succeeds if Upstart fails to stop
// arcvm-pre-login-services.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStopArcVmPreLoginServicesJobFail) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StopArcVmPreLoginServicesJobFail) {
// Inject failure to FakeUpstartClient.
InjectUpstartStopJobFailure(kArcVmPreLoginServicesJobName);
@ -784,7 +784,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStopArcVmPreLoginServicesJobFail) {
// Tests that |kArcVmPreLoginServicesJobName| is properly stopped and then
// started in StartMiniArc().
TEST_F(ArcVmClientAdapterTest, StartMiniArcJobRestart) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_JobRestart) {
ash::FakeUpstartClient::Get()->StartRecordingUpstartOperations();
StartMiniArc();
@ -898,7 +898,7 @@ TEST_F(ArcVmClientAdapterTest, DoesNotGetArcInstanceStoppedOnNestedInstance) {
}
// Tests that StopArcInstance() initiates ARC log backup.
TEST_F(ArcVmClientAdapterTest, StopArcInstanceWithLogBackup) {
TEST_F(ArcVmClientAdapterTest, StopArcInstance_WithLogBackup) {
StartMiniArc();
UpgradeArc(true);
@ -918,7 +918,7 @@ TEST_F(ArcVmClientAdapterTest, StopArcInstanceWithLogBackup) {
EXPECT_FALSE(is_system_shutdown().value());
}
TEST_F(ArcVmClientAdapterTest, StopArcInstanceWithLogBackupBackupFailed) {
TEST_F(ArcVmClientAdapterTest, StopArcInstance_WithLogBackup_BackupFailed) {
StartMiniArc();
UpgradeArc(true);
@ -944,7 +944,7 @@ TEST_F(ArcVmClientAdapterTest, StopArcInstanceWithLogBackupBackupFailed) {
}
// Tests that StopArcInstance() called during shutdown doesn't do anything.
TEST_F(ArcVmClientAdapterTest, StopArcInstanceOnShutdown) {
TEST_F(ArcVmClientAdapterTest, StopArcInstance_OnShutdown) {
StartMiniArc();
UpgradeArc(true);
@ -955,7 +955,7 @@ TEST_F(ArcVmClientAdapterTest, StopArcInstanceOnShutdown) {
}
// Tests that StopArcInstance() immediately notifies the observer on failure.
TEST_F(ArcVmClientAdapterTest, StopArcInstanceFail) {
TEST_F(ArcVmClientAdapterTest, StopArcInstance_Fail) {
StartMiniArc();
UpgradeArc(true);
@ -978,7 +978,7 @@ TEST_F(ArcVmClientAdapterTest, StopArcInstanceFail) {
// Test that StopArcInstance() stops the VM if only mini-ARCVM
// is called.
TEST_F(ArcVmClientAdapterTest, StopArcInstanceStopMiniVm) {
TEST_F(ArcVmClientAdapterTest, StopArcInstance_StopMiniVm) {
StartMiniArc();
adapter()->StopArcInstance(/*on_shutdown=*/false,
@ -996,7 +996,7 @@ TEST_F(ArcVmClientAdapterTest, StopArcInstanceStopMiniVm) {
// Tests that UpgradeArc() handles arcvm-post-login-services startup failures
// properly.
TEST_F(ArcVmClientAdapterTest, UpgradeArcStartArcVmPostLoginServicesFailure) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_StartArcVmPostLoginServicesFailure) {
StartMiniArc();
// Inject failure to FakeUpstartClient.
@ -1010,7 +1010,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcStartArcVmPostLoginServicesFailure) {
// Tests that StartMiniArc()'s JOB_STOP_AND_START for
// |kArcVmPreLoginServicesJobName| does not have DISABLE_UREADAHEAD variable
// by default.
TEST_F(ArcVmClientAdapterTest, StartMiniArcUreadaheadByDefault) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_UreadaheadByDefault) {
StartParams start_params(GetPopulatedStartParams());
ash::FakeUpstartClient::Get()->StartRecordingUpstartOperations();
StartMiniArcWithParams(true, std::move(start_params));
@ -1056,7 +1056,7 @@ TEST_F(ArcVmClientAdapterTest,
}
// Tests that a "Failed Adb Sideload response" case is handled properly.
TEST_F(ArcVmClientAdapterTest, UpgradeArcFailedAdbResponse) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_FailedAdbResponse) {
StartMiniArc();
// Ask the Fake Session Manager to return a failed Adb Sideload response.
@ -1068,7 +1068,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcFailedAdbResponse) {
}
// Tests that a "Need_Powerwash Adb Sideload response" case is handled properly.
TEST_F(ArcVmClientAdapterTest, UpgradeArcNeedPowerwashAdbResponse) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_NeedPowerwashAdbResponse) {
StartMiniArc();
// Ask the Fake Session Manager to return a Need_Powerwash Adb Sideload
@ -1083,7 +1083,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcNeedPowerwashAdbResponse) {
}
// Tests that adb sideloading is disabled by default.
TEST_F(ArcVmClientAdapterTest, UpgradeArcAdbSideloadingPropertyDefault) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_AdbSideloadingPropertyDefault) {
StartMiniArc();
UpgradeArc(true);
@ -1094,7 +1094,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcAdbSideloadingPropertyDefault) {
}
// Tests that adb sideloading can be controlled via session_manager.
TEST_F(ArcVmClientAdapterTest, UpgradeArcAdbSideloadingPropertyEnabled) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_AdbSideloadingPropertyEnabled) {
StartMiniArc();
ash::FakeSessionManagerClient::Get()->set_adb_sideload_enabled(true);
@ -1105,7 +1105,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcAdbSideloadingPropertyEnabled) {
"ro.boot.enable_adb_sideloading=1"));
}
TEST_F(ArcVmClientAdapterTest, UpgradeArcAdbSideloadingPropertyDisabled) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_AdbSideloadingPropertyDisabled) {
StartMiniArc();
ash::FakeSessionManagerClient::Get()->set_adb_sideload_enabled(false);
@ -1117,7 +1117,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcAdbSideloadingPropertyDisabled) {
}
// Tests that "no serial" failure is handled properly.
TEST_F(ArcVmClientAdapterTest, UpgradeArcNoSerial) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_NoSerial) {
// Don't set the serial number.
StartMiniArcWithParamsAndUser(true, {}, kUserIdHash, std::string());
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
@ -1126,7 +1126,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcNoSerial) {
ExpectArcStopped();
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcStopExistingVmFailure) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StopExistingVmFailure) {
// Inject failure.
vm_tools::concierge::SuccessFailureResponse response;
response.set_success(false);
@ -1138,7 +1138,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStopExistingVmFailure) {
EXPECT_FALSE(is_system_shutdown().has_value());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcStopExistingVmFailureEmptyReply) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StopExistingVmFailureEmptyReply) {
// Inject failure.
GetTestConciergeClient()->set_stop_vm_response(std::nullopt);
@ -1150,7 +1150,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStopExistingVmFailureEmptyReply) {
// Tests that ConciergeClient::WaitForServiceToBeAvailable() failure is handled
// properly.
TEST_F(ArcVmClientAdapterTest, StartMiniArcWaitForConciergeAvailableFailure) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_WaitForConciergeAvailableFailure) {
// Inject failure.
GetTestConciergeClient()->set_wait_for_service_to_be_available_response(
false);
@ -1161,7 +1161,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcWaitForConciergeAvailableFailure) {
}
// Tests that StartArcVm() failure is handled properly.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmFailure) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StartArcVmFailure) {
// Inject failure to StartArcVm().
vm_tools::concierge::StartVmResponse start_vm_response;
start_vm_response.set_status(vm_tools::concierge::VM_STATUS_UNKNOWN);
@ -1173,7 +1173,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmFailure) {
EXPECT_FALSE(is_system_shutdown().has_value());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmFailureEmptyReply) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StartArcVmFailureEmptyReply) {
// Inject failure to StartArcVm(). This emulates D-Bus timeout situations.
GetTestConciergeClient()->set_start_vm_response(std::nullopt);
@ -1184,7 +1184,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmFailureEmptyReply) {
}
// Tests that successful StartArcVm() call is handled properly.
TEST_F(ArcVmClientAdapterTest, UpgradeArcSuccess) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_Success) {
StartMiniArc();
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
EXPECT_FALSE(is_system_shutdown().has_value());
@ -1194,7 +1194,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcSuccess) {
}
// Try to start and upgrade the instance with more params.
TEST_F(ArcVmClientAdapterTest, StartUpgradeArcVariousParams) {
TEST_F(ArcVmClientAdapterTest, StartUpgradeArc_VariousParams) {
StartParams start_params(GetPopulatedStartParams());
StartMiniArcWithParams(true, std::move(start_params));
@ -1207,7 +1207,7 @@ TEST_F(ArcVmClientAdapterTest, StartUpgradeArcVariousParams) {
// Try to start and upgrade the instance with slightly different params
// than StartUpgradeArc_VariousParams for better code coverage.
TEST_F(ArcVmClientAdapterTest, StartUpgradeArcVariousParams2) {
TEST_F(ArcVmClientAdapterTest, StartUpgradeArc_VariousParams2) {
StartParams start_params(GetPopulatedStartParams());
// Use slightly different params than StartUpgradeArc_VariousParams.
start_params.play_store_auto_update =
@ -1229,7 +1229,7 @@ TEST_F(ArcVmClientAdapterTest, StartUpgradeArcVariousParams2) {
}
// Try to start and upgrade the instance with demo mode enabled.
TEST_F(ArcVmClientAdapterTest, StartUpgradeArcDemoMode) {
TEST_F(ArcVmClientAdapterTest, StartUpgradeArc_DemoMode) {
constexpr char kDemoImage[] =
"/run/imageloader/demo-mode-resources/0.0.1.7/android_demo_apps.squash";
base::FilePath apps_path = base::FilePath(kDemoImage);
@ -1271,7 +1271,7 @@ TEST_F(ArcVmClientAdapterTest, StartUpgradeArcDemoMode) {
"ro.boot.arc_demo_mode=1"));
}
TEST_F(ArcVmClientAdapterTest, StartUpgradeArcDisableMediaStoreMaintenance) {
TEST_F(ArcVmClientAdapterTest, StartUpgradeArc_DisableMediaStoreMaintenance) {
StartParams start_params(GetPopulatedStartParams());
start_params.disable_media_store_maintenance = true;
StartMiniArcWithParams(true, std::move(start_params));
@ -1284,7 +1284,7 @@ TEST_F(ArcVmClientAdapterTest, StartUpgradeArcDisableMediaStoreMaintenance) {
request.mini_instance_request().disable_media_store_maintenance());
}
TEST_F(ArcVmClientAdapterTest, StartUpgradeArcArcVmUreadaheadMode) {
TEST_F(ArcVmClientAdapterTest, StartUpgradeArc_ArcVmUreadaheadMode) {
StartParams start_params(GetPopulatedStartParams());
StartMiniArcWithParams(true, std::move(start_params));
UpgradeParams params(GetPopulatedUpgradeParams());
@ -1296,7 +1296,7 @@ TEST_F(ArcVmClientAdapterTest, StartUpgradeArcArcVmUreadaheadMode) {
vm_tools::concierge::StartArcVmRequest::UREADAHEAD_MODE_READAHEAD);
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcEnablePaiGeneration) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_EnablePaiGeneration) {
StartParams start_params(GetPopulatedStartParams());
start_params.arc_generate_play_auto_install = true;
StartMiniArcWithParams(true, std::move(start_params));
@ -1304,7 +1304,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcEnablePaiGeneration) {
EXPECT_TRUE(request.mini_instance_request().arc_generate_pai());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcPaiGenerationDefaultDisabled) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_PaiGenerationDefaultDisabled) {
StartMiniArcWithParams(true, GetPopulatedStartParams());
// No androidboot property should be generated.
const auto& request = GetTestConciergeClient()->start_arc_vm_request();
@ -1312,7 +1312,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcPaiGenerationDefaultDisabled) {
}
// Tests that StartArcVm() is called with valid parameters.
TEST_F(ArcVmClientAdapterTest, StartMiniArcStartArcVmParams) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_StartArcVmParams) {
StartMiniArc();
ASSERT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
@ -1397,7 +1397,7 @@ TEST_F(ArcVmClientAdapterTest, CrosvmAndConciergeCrashes) {
}
// Tests the case where a unknown VmStopped signal is sent to Chrome.
TEST_F(ArcVmClientAdapterTest, VmStoppedSignalUnknownCid) {
TEST_F(ArcVmClientAdapterTest, VmStoppedSignal_UnknownCid) {
StartMiniArc();
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
EXPECT_FALSE(is_system_shutdown().has_value());
@ -1410,7 +1410,7 @@ TEST_F(ArcVmClientAdapterTest, VmStoppedSignalUnknownCid) {
}
// Tests the case where a stale VmStopped signal is sent to Chrome.
TEST_F(ArcVmClientAdapterTest, VmStoppedSignalStale) {
TEST_F(ArcVmClientAdapterTest, VmStoppedSignal_Stale) {
SendVmStoppedSignalForCid(vm_tools::concierge::STOP_VM_REQUESTED, 42);
run_loop()->RunUntilIdle();
EXPECT_FALSE(is_system_shutdown().has_value());
@ -1418,7 +1418,7 @@ TEST_F(ArcVmClientAdapterTest, VmStoppedSignalStale) {
// Tests the case where a VmStopped signal not for ARCVM (e.g. Termina) is sent
// to Chrome.
TEST_F(ArcVmClientAdapterTest, VmStoppedSignalTermina) {
TEST_F(ArcVmClientAdapterTest, VmStoppedSignal_Termina) {
SendVmStoppedSignalNotForArcVm(vm_tools::concierge::STOP_VM_REQUESTED);
run_loop()->RunUntilIdle();
EXPECT_FALSE(is_system_shutdown().has_value());
@ -1439,7 +1439,7 @@ TEST_F(ArcVmClientAdapterTest, TestConciergeServiceStarted) {
}
// Tests that the kernel parameter does not include "rw" by default.
TEST_F(ArcVmClientAdapterTest, KernelParamRO) {
TEST_F(ArcVmClientAdapterTest, KernelParam_RO) {
set_host_rootfs_writable(false);
set_system_image_ext_format(false);
StartMiniArc();
@ -1452,7 +1452,7 @@ TEST_F(ArcVmClientAdapterTest, KernelParamRO) {
// Tests that the kernel parameter does include "rw" when '/' is writable and
// the image is in ext4.
TEST_F(ArcVmClientAdapterTest, KernelParamRW) {
TEST_F(ArcVmClientAdapterTest, KernelParam_RW) {
set_host_rootfs_writable(true);
set_system_image_ext_format(true);
StartMiniArc();
@ -1476,7 +1476,7 @@ TEST_F(ArcVmClientAdapterTest, SpecifyBlockSize) {
GetTestConciergeClient()->start_arc_vm_request().rootfs_block_size());
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkersDisabled) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkers_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(arc::kEnableVirtioBlkMultipleWorkers);
@ -1493,7 +1493,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkersDisabled) {
}
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkersEnabledNoBlkData) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkers_Enabled_NoBlkData) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(arc::kEnableVirtioBlkMultipleWorkers);
@ -1512,7 +1512,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkersEnabledNoBlkData) {
}
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkersEnabledBlkData) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkers_Enabled_BlkData) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(arc::kEnableVirtioBlkMultipleWorkers);
@ -1539,7 +1539,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkMultipleWorkersEnabledBlkData) {
}
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataDisabled) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_Disabled) {
GetTestConciergeClient()->set_create_disk_image_response(
CreateDiskImageResponse(vm_tools::concierge::DISK_STATUS_CREATED));
@ -1557,7 +1557,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataDisabled) {
EXPECT_FALSE(req.enable_virtio_blk_data());
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskimageResponseEmpty) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_CreateDiskimageResponseEmpty) {
// CreateDiskImage() returns an empty response.
GetTestConciergeClient()->set_create_disk_image_response(std::nullopt);
@ -1570,7 +1570,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskimageResponseEmpty) {
EXPECT_EQ(GetTestConciergeClient()->create_disk_image_call_count(), 1);
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskImageStatusFailed) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_CreateDiskImageStatusFailed) {
GetTestConciergeClient()->set_create_disk_image_response(
CreateDiskImageResponse(vm_tools::concierge::DISK_STATUS_FAILED));
@ -1584,7 +1584,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskImageStatusFailed) {
EXPECT_EQ(GetTestConciergeClient()->create_disk_image_call_count(), 1);
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskImageStatusCreated) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_CreateDiskImageStatusCreated) {
GetTestConciergeClient()->set_create_disk_image_response(
CreateDiskImageResponse(vm_tools::concierge::DISK_STATUS_CREATED));
@ -1601,7 +1601,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskImageStatusCreated) {
EXPECT_TRUE(req.enable_virtio_blk_data());
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskImageStatusExists) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_CreateDiskImageStatusExists) {
GetTestConciergeClient()->set_create_disk_image_response(
CreateDiskImageResponse(vm_tools::concierge::DISK_STATUS_EXISTS));
@ -1618,7 +1618,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataCreateDiskImageStatusExists) {
EXPECT_TRUE(req.enable_virtio_blk_data());
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataLvmSupported) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_LvmSupported) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(arc::kLvmApplicationContainers);
@ -1646,7 +1646,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataLvmSupported) {
EXPECT_TRUE(it->o_direct());
}
TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataNoLvmForEphemeralCryptohome) {
TEST_F(ArcVmClientAdapterTest, VirtioBlkForData_NoLvmForEphemeralCryptohome) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(arc::kLvmApplicationContainers);
@ -1670,7 +1670,7 @@ TEST_F(ArcVmClientAdapterTest, VirtioBlkForDataNoLvmForEphemeralCryptohome) {
EXPECT_TRUE(req.enable_virtio_blk_data());
}
TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerEnabled) {
TEST_F(ArcVmClientAdapterTest, DataBlockIoScheduler_Enabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeaturesAndParameters(
{{arc::kBlockIoScheduler, {{"data_block_io_scheduler", "true"}}}}, {});
@ -1684,7 +1684,7 @@ TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerEnabled) {
EXPECT_TRUE(req.enable_data_block_io_scheduler());
}
TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerDisabled) {
TEST_F(ArcVmClientAdapterTest, DataBlockIoScheduler_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeaturesAndParameters(
// Disabled.
@ -1699,7 +1699,7 @@ TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerDisabled) {
EXPECT_FALSE(req.enable_data_block_io_scheduler());
}
TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerVirtioBlkDataIsDisabled) {
TEST_F(ArcVmClientAdapterTest, DataBlockIoScheduler_VirtioBlkDataIsDisabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeaturesAndParameters(
{{arc::kBlockIoScheduler, {{"data_block_io_scheduler", "true"}}}}, {});
@ -1714,7 +1714,7 @@ TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerVirtioBlkDataIsDisabled) {
EXPECT_FALSE(req.enable_data_block_io_scheduler());
}
TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerDisabledForLvm) {
TEST_F(ArcVmClientAdapterTest, DataBlockIoScheduler_DisabledForLvm) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeaturesAndParameters(
// Uses LVM.
@ -1731,7 +1731,7 @@ TEST_F(ArcVmClientAdapterTest, DataBlockIoSchedulerDisabledForLvm) {
EXPECT_FALSE(req.enable_data_block_io_scheduler());
}
TEST_F(ArcVmClientAdapterTest, MetadataDiskDisabledForArcT) {
TEST_F(ArcVmClientAdapterTest, MetadataDisk_DisabledForArcT) {
// Metadata disk should not be requested for ARC T.
base::test::ScopedChromeOSVersionInfo version(
"CHROMEOS_ARC_ANDROID_SDK_VERSION=33", base::Time::Now());
@ -1746,7 +1746,7 @@ TEST_F(ArcVmClientAdapterTest, MetadataDiskDisabledForArcT) {
EXPECT_FALSE(HasDiskImage(req, metadta_disk_path));
}
TEST_F(ArcVmClientAdapterTest, MetadataDiskEnabledForArcU) {
TEST_F(ArcVmClientAdapterTest, MetadataDisk_EnabledForArcU) {
// Metadata disk should be requested for ARC U.
base::test::ScopedChromeOSVersionInfo version(
"CHROMEOS_ARC_ANDROID_SDK_VERSION=34", base::Time::Now());
@ -1941,7 +1941,7 @@ TEST_F(ArcVmClientAdapterTest, TestBootNotificationServerIsNotListening) {
// Tests that UpgradeArc() fails when sending the upgrade props
// to the boot notification server fails.
TEST_F(ArcVmClientAdapterTest, UpgradeArcSendPropFail) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_SendPropFail) {
StartMiniArc();
// Let ConnectToArcVmBootNotificationServer() return an invalid FD.
@ -1953,7 +1953,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcSendPropFail) {
// Tests that UpgradeArc() fails when sending the upgrade props
// to the boot notification server fails.
TEST_F(ArcVmClientAdapterTest, UpgradeArcSendPropFailNotWritable) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_SendPropFailNotWritable) {
StartMiniArc();
// Let ConnectToArcVmBootNotificationServer() return dup(STDIN_FILENO) which
@ -2002,7 +2002,7 @@ TEST_F(ArcVmClientAdapterTest, TrimVmMemorySuccess) {
EXPECT_EQ(GetTestConciergeClient()->reclaim_vm_request().page_limit(), 0);
}
TEST_F(ArcVmClientAdapterTest, TrimVmMemoryLimitPagesHonored) {
TEST_F(ArcVmClientAdapterTest, TrimVmMemory_LimitPagesHonored) {
StartMiniArc();
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
EXPECT_FALSE(is_system_shutdown().has_value());
@ -2033,7 +2033,7 @@ TEST_F(ArcVmClientAdapterTest, TrimVmMemoryLimitPagesHonored) {
StopArcInstance();
}
TEST_F(ArcVmClientAdapterTest, TrimVmMemoryFailure) {
TEST_F(ArcVmClientAdapterTest, TrimVmMemory_Failure) {
SetValidUserInfo();
constexpr const char kReason[] = "This is the reason";
@ -2056,7 +2056,7 @@ TEST_F(ArcVmClientAdapterTest, TrimVmMemoryFailure) {
EXPECT_EQ(kReason, reason);
}
TEST_F(ArcVmClientAdapterTest, TrimVmMemoryEmptyResponse) {
TEST_F(ArcVmClientAdapterTest, TrimVmMemory_EmptyResponse) {
SetValidUserInfo();
// By default, the fake concierge client returns an empty response.
@ -2075,7 +2075,7 @@ TEST_F(ArcVmClientAdapterTest, TrimVmMemoryEmptyResponse) {
EXPECT_FALSE(reason.empty());
}
TEST_F(ArcVmClientAdapterTest, TrimVmMemoryEmptyUserIdHash) {
TEST_F(ArcVmClientAdapterTest, TrimVmMemory_EmptyUserIdHash) {
adapter()->SetUserInfo(cryptohome::Identification(), std::string(),
std::string());
@ -2331,7 +2331,7 @@ TEST_F(ArcVmClientAdapterTest, OnConnectionReady) {
}
// Tests that ArcVmCompleteBoot failure won't crash the adapter.
TEST_F(ArcVmClientAdapterTest, OnConnectionReadyArcVmCompleteBootFailure) {
TEST_F(ArcVmClientAdapterTest, OnConnectionReady_ArcVmCompleteBootFailure) {
StartParams start_params(GetPopulatedStartParams());
StartMiniArcWithParams(true, std::move(start_params));
UpgradeArc(true);
@ -2367,7 +2367,7 @@ TEST_F(ArcVmClientAdapterTest,
EXPECT_EQ(1, GetTestConciergeClient()->arcvm_complete_boot_call_count());
}
TEST_F(ArcVmClientAdapterTest, UpgradeArcEnableArcNearbyShareDefault) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_EnableArcNearbyShare_Default) {
StartMiniArc();
EXPECT_EQ(boot_notification_server()->connection_count(), 1);
EXPECT_TRUE(boot_notification_server()->received_data().empty());
@ -2379,7 +2379,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcEnableArcNearbyShareDefault) {
"ro.boot.enable_arc_nearby_share=1"));
}
TEST_F(ArcVmClientAdapterTest, UpgradeArcEnableArcNearbyShareEnabled) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_EnableArcNearbyShare_Enabled) {
StartMiniArc();
EXPECT_EQ(boot_notification_server()->connection_count(), 1);
EXPECT_TRUE(boot_notification_server()->received_data().empty());
@ -2393,7 +2393,7 @@ TEST_F(ArcVmClientAdapterTest, UpgradeArcEnableArcNearbyShareEnabled) {
"ro.boot.enable_arc_nearby_share=1"));
}
TEST_F(ArcVmClientAdapterTest, UpgradeArcEnableArcNearbyShareDisabled) {
TEST_F(ArcVmClientAdapterTest, UpgradeArc_EnableArcNearbyShare_Disabled) {
StartMiniArc();
EXPECT_EQ(boot_notification_server()->connection_count(), 1);
EXPECT_TRUE(boot_notification_server()->received_data().empty());
@ -2427,7 +2427,7 @@ TEST_F(ArcVmClientAdapterTest,
request.mini_instance_request().enable_consumer_auto_update_toggle());
}
TEST_F(ArcVmClientAdapterTest, StartArcEnablePrivacyHubForChromeDefault) {
TEST_F(ArcVmClientAdapterTest, StartArc_EnablePrivacyHubForChrome_Default) {
StartMiniArc();
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
EXPECT_FALSE(is_system_shutdown().has_value());
@ -2435,7 +2435,7 @@ TEST_F(ArcVmClientAdapterTest, StartArcEnablePrivacyHubForChromeDefault) {
EXPECT_FALSE(request.mini_instance_request().enable_privacy_hub_for_chrome());
}
TEST_F(ArcVmClientAdapterTest, StartArcEnablePrivacyHubForChromeEnabled) {
TEST_F(ArcVmClientAdapterTest, StartArc_EnablePrivacyHubForChrome_Enabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(ash::features::kCrosPrivacyHub);
StartMiniArc();
@ -2445,7 +2445,7 @@ TEST_F(ArcVmClientAdapterTest, StartArcEnablePrivacyHubForChromeEnabled) {
EXPECT_TRUE(request.mini_instance_request().enable_privacy_hub_for_chrome());
}
TEST_F(ArcVmClientAdapterTest, StartArcEnablePrivacyHubForChromeDisabled) {
TEST_F(ArcVmClientAdapterTest, StartArc_EnablePrivacyHubForChrome_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(ash::features::kCrosPrivacyHub);
StartMiniArc();
@ -2455,7 +2455,7 @@ TEST_F(ArcVmClientAdapterTest, StartArcEnablePrivacyHubForChromeDisabled) {
EXPECT_FALSE(request.mini_instance_request().enable_privacy_hub_for_chrome());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcArcSwitchToKeymintDefault) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_ArcSwitchToKeymint_Default) {
StartMiniArc();
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
EXPECT_FALSE(is_system_shutdown().has_value());
@ -2463,7 +2463,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcArcSwitchToKeymintDefault) {
EXPECT_FALSE(request.mini_instance_request().arc_switch_to_keymint());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationDefault) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_EnableArcAttestation_Default) {
StartMiniArc();
EXPECT_GE(GetTestConciergeClient()->start_arc_vm_call_count(), 1);
EXPECT_FALSE(is_system_shutdown().has_value());
@ -2471,7 +2471,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationDefault) {
EXPECT_FALSE(request.mini_instance_request().enable_arc_attestation());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationEnabled) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_EnableArcAttestation_Enabled) {
base::test::ScopedChromeOSVersionInfo version(
base::StringPrintf("CHROMEOS_ARC_ANDROID_SDK_VERSION=%d",
arc::kArcVersionT),
@ -2487,7 +2487,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationEnabled) {
EXPECT_TRUE(request.mini_instance_request().enable_arc_attestation());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationDisabledOnR) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_EnableArcAttestation_DisabledOnR) {
base::test::ScopedChromeOSVersionInfo version(
base::StringPrintf("CHROMEOS_ARC_ANDROID_SDK_VERSION=%d",
arc::kArcVersionR),
@ -2503,7 +2503,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationDisabledOnR) {
EXPECT_FALSE(request.mini_instance_request().enable_arc_attestation());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcEnableArcAttestationDisabledOnT) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_EnableArcAttestation_DisabledOnT) {
base::test::ScopedChromeOSVersionInfo version(
base::StringPrintf("CHROMEOS_ARC_ANDROID_SDK_VERSION=%d",
arc::kArcVersionT),
@ -2565,7 +2565,7 @@ TEST_F(ArcVmClientAdapterTest, ArcGuestZramSwappinessValid) {
EXPECT_EQ(256u, request.guest_zram_mib());
}
TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage5GbSystem) {
TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage_5GbSystem) {
class TestDelegate : public ArcVmClientAdapterDelegate {
bool GetSystemMemoryInfo(base::SystemMemoryInfoKB* info) override {
info->total = 5 * 1024 * 1024;
@ -2590,7 +2590,7 @@ TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage5GbSystem) {
EXPECT_EQ(2310u, request.guest_zram_mib());
}
TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage4GbSystem) {
TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage_4GbSystem) {
class TestDelegate : public ArcVmClientAdapterDelegate {
bool GetSystemMemoryInfo(base::SystemMemoryInfoKB* info) override {
info->total = 4 * 1024 * 1024;
@ -2615,7 +2615,7 @@ TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage4GbSystem) {
EXPECT_EQ(1798u, request.guest_zram_mib());
}
TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentageCustomMem) {
TEST_F(ArcVmClientAdapterTest, ArcGuestZramSizeByPercentage_CustomMem) {
class TestDelegate : public ArcVmClientAdapterDelegate {
bool GetSystemMemoryInfo(base::SystemMemoryInfoKB* info) override {
info->total = 6 * 1024 * 1024;
@ -2757,7 +2757,7 @@ TEST_F(ArcVmClientAdapterTest, ArcVmPlayStoreAutoUpdateDefault) {
request.mini_instance_request().play_store_auto_update());
}
TEST_F(ArcVmClientAdapterTest, ConvertUpgradeParamsSkipTtsCacheSetup) {
TEST_F(ArcVmClientAdapterTest, ConvertUpgradeParams_SkipTtsCacheSetup) {
StartMiniArc();
UpgradeParams upgrade_params = GetPopulatedUpgradeParams();
upgrade_params.skip_tts_cache = true;
@ -2766,7 +2766,7 @@ TEST_F(ArcVmClientAdapterTest, ConvertUpgradeParamsSkipTtsCacheSetup) {
"ro.boot.skip_tts_cache=1"));
}
TEST_F(ArcVmClientAdapterTest, ConvertUpgradeParamsEnableTtsCacheSetup) {
TEST_F(ArcVmClientAdapterTest, ConvertUpgradeParams_EnableTtsCacheSetup) {
StartMiniArc();
UpgradeParams upgrade_params = GetPopulatedUpgradeParams();
upgrade_params.skip_tts_cache = false;
@ -2820,7 +2820,7 @@ TEST_F(ArcVmClientAdapterTest, ArcCustomTabsExperimentTrue) {
EXPECT_TRUE(request.mini_instance_request().arc_custom_tabs_experiment());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcArcSignedIn) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_ArcSignedIn) {
StartParams start_params(GetPopulatedStartParams());
start_params.arc_signed_in = true;
StartMiniArcWithParams(true, std::move(start_params));
@ -2828,7 +2828,7 @@ TEST_F(ArcVmClientAdapterTest, StartMiniArcArcSignedIn) {
EXPECT_TRUE(request.mini_instance_request().arc_signed_in());
}
TEST_F(ArcVmClientAdapterTest, StartMiniArcArcSignedInDisabled) {
TEST_F(ArcVmClientAdapterTest, StartMiniArc_ArcSignedInDisabled) {
StartMiniArcWithParams(true, GetPopulatedStartParams());
const auto& request = GetTestConciergeClient()->start_arc_vm_request();
EXPECT_FALSE(request.mini_instance_request().arc_signed_in());
@ -2848,7 +2848,7 @@ TEST_F(ArcVmClientAdapterTest, ArcPriorityAppLmkDelayDisabled) {
"ro.boot.arc.lmk.priority_apps"));
}
TEST_F(ArcVmClientAdapterTest, ArcPriorityAppLmkDelayEnabledNoApp) {
TEST_F(ArcVmClientAdapterTest, ArcPriorityAppLmkDelayEnabled_NoApp) {
StartMiniArc();
UpgradeParams upgrade_params = GetPopulatedUpgradeParams();
upgrade_params.enable_priority_app_lmk_delay = true;
@ -2863,7 +2863,7 @@ TEST_F(ArcVmClientAdapterTest, ArcPriorityAppLmkDelayEnabledNoApp) {
"ro.boot.arc.lmk.priority_apps"));
}
TEST_F(ArcVmClientAdapterTest, ArcPriorityAppLmkDelayEnabledSomeApp) {
TEST_F(ArcVmClientAdapterTest, ArcPriorityAppLmkDelayEnabled_SomeApp) {
StartMiniArc();
UpgradeParams upgrade_params = GetPopulatedUpgradeParams();
upgrade_params.enable_priority_app_lmk_delay = true;
@ -2930,7 +2930,7 @@ TEST_F(ArcVmClientAdapterTest, SkipDexOptCacheSetupArcR) {
"ro.boot.skip_dexopt_cache"));
}
TEST_F(ArcVmClientAdapterTest, VirtualSwapDeviceEnabled) {
TEST_F(ArcVmClientAdapterTest, VirtualSwapDevice_Enabled) {
base::FieldTrialParams params;
params["size"] = base::NumberToString(256 * 1024 * 1024);
params["virtual_swap_enabled"] = "true";

@ -37,11 +37,11 @@ class FileSystemStatusTest : public testing::Test {
base::ScopedTempDir dir_;
};
TEST_F(FileSystemStatusTest, IsSystemImageExtFormatFileMissing) {
TEST_F(FileSystemStatusTest, IsSystemImageExtFormat_FileMissing) {
EXPECT_FALSE(IsSystemImageExtFormat(base::FilePath("/nonexistent")));
}
TEST_F(FileSystemStatusTest, IsSystemImageExtFormatFileSizeTooSmall) {
TEST_F(FileSystemStatusTest, IsSystemImageExtFormat_FileSizeTooSmall) {
base::FilePath file;
ASSERT_TRUE(base::CreateTemporaryFile(&file));
std::vector<uint8_t> data(100, 0);
@ -50,7 +50,7 @@ TEST_F(FileSystemStatusTest, IsSystemImageExtFormatFileSizeTooSmall) {
EXPECT_FALSE(IsSystemImageExtFormat(file));
}
TEST_F(FileSystemStatusTest, IsSystemImageExtFormatMagicNumberDoesNotMatch) {
TEST_F(FileSystemStatusTest, IsSystemImageExtFormat_MagicNumberDoesNotMatch) {
base::FilePath file;
ASSERT_TRUE(base::CreateTemporaryFile(&file));
std::vector<uint8_t> data(2048, 0);
@ -59,7 +59,7 @@ TEST_F(FileSystemStatusTest, IsSystemImageExtFormatMagicNumberDoesNotMatch) {
EXPECT_FALSE(IsSystemImageExtFormat(file));
}
TEST_F(FileSystemStatusTest, IsSystemImageExtFormatMagicNumberMatches) {
TEST_F(FileSystemStatusTest, IsSystemImageExtFormat_MagicNumberMatches) {
base::FilePath file;
ASSERT_TRUE(base::CreateTemporaryFile(&file));
std::vector<uint8_t> data(2048, 0);

@ -162,7 +162,7 @@ TEST_F(SerialNumberUtilTest, GetOrCreateSerialNumber) {
// That shouldn't happen, but verify that the function can recover the state
// even if local state has an invalid hex salt.
TEST_F(SerialNumberUtilTest, GetOrCreateSerialNumberInvalidLocalState) {
TEST_F(SerialNumberUtilTest, GetOrCreateSerialNumber_InvalidLocalState) {
constexpr size_t kSaltLen = 16;
const std::string chromeos_user = "user@gmail.com";
@ -217,7 +217,7 @@ TEST_F(SerialNumberUtilTest, GetOrCreateSerialNumberInvalidLocalState) {
// Verify that GetOrCreateSerialNumber uses decoded salt when computing the
// serial number.
TEST_F(SerialNumberUtilTest, GetOrCreateSerialNumberSerialNumberComputation) {
TEST_F(SerialNumberUtilTest, GetOrCreateSerialNumber_SerialNumberComputation) {
constexpr size_t kSaltLen = 16;
const std::string chromeos_user = "user@gmail.com";

@ -179,7 +179,7 @@ TEST_F(ArcSystemUIBridgeTest, SendOverlayColor) {
system_ui_instance_.theme_style());
}
TEST_F(ArcSystemUIBridgeTest, OnConnectionReadyNeutralToSpritzConversion) {
TEST_F(ArcSystemUIBridgeTest, OnConnectionReady_NeutralToSpritzConversion) {
EXPECT_FALSE(system_ui_instance_.dark_theme_status());
ash::ColorPaletteSeed seed;
seed.color_mode = ui::ColorProviderKey::ColorMode::kLight;

@ -301,7 +301,7 @@ TEST_F(ArcTimerTest, CheckMultipleCreateTimersTest) {
EXPECT_TRUE(CreateTimers(clocks));
}
TEST_F(ArcTimerTest, SetTimeTestRequestedTimeIsInvalid) {
TEST_F(ArcTimerTest, SetTimeTest_RequestedTimeIsInvalid) {
// Time::Now() + 25 hours should be rejected.
base::Time time_to_set =
base::Time::Now() + kArcSetTimeMaxTimeDelta + base::Hours(1);
@ -316,7 +316,7 @@ TEST_F(ArcTimerTest, SetTimeTestRequestedTimeIsInvalid) {
EXPECT_EQ(future2.Get(), mojom::ArcTimerResult::FAILURE);
}
TEST_F(ArcTimerTest, SetTimeTestRequestedTimeIsValid) {
TEST_F(ArcTimerTest, SetTimeTest_RequestedTimeIsValid) {
// Time::Now() + 23 hours should be accepted.
const base::Time time_to_set =
base::Time::Now() + kArcSetTimeMaxTimeDelta - base::Hours(1);
@ -338,7 +338,7 @@ TEST_F(ArcTimerTest, SetTimeTestRequestedTimeIsValid) {
EXPECT_EQ(future.Get(), mojom::ArcTimerResult::SUCCESS);
}
TEST_F(ArcTimerTest, SetTimeTestUpstartJobFails) {
TEST_F(ArcTimerTest, SetTimeTest_UpstartJobFails) {
const base::Time time_to_set =
base::Time::Now() + kArcSetTimeMaxTimeDelta - base::Hours(1);

@ -159,7 +159,7 @@ class ArcVolumeMounterBridgeTest : public testing::Test {
std::unique_ptr<ArcVolumeMounterBridge> bridge_;
};
TEST_F(ArcVolumeMounterBridgeTest, OnMountEventRemovableMedia) {
TEST_F(ArcVolumeMounterBridgeTest, OnMountEvent_RemovableMedia) {
constexpr char kDevicePath[] = "/dev/foo";
constexpr char kMountPath[] = "/media/removable/UNTITLED";
constexpr char kFsUUID[] = "0123-abcd";
@ -204,7 +204,7 @@ TEST_F(ArcVolumeMounterBridgeTest, OnMountEventRemovableMedia) {
EXPECT_FALSE(delegate()->is_watching(kMountPath));
}
TEST_F(ArcVolumeMounterBridgeTest, OnMountEventIgnoreNonRemovableMedia) {
TEST_F(ArcVolumeMounterBridgeTest, OnMountEvent_IgnoreNonRemovableMedia) {
// Only the (un)mount events for /media/removable/* are propagated.
bridge()->OnMountEvent(DiskMountManager::MountEvent::MOUNTING,
@ -220,7 +220,7 @@ TEST_F(ArcVolumeMounterBridgeTest, OnMountEventIgnoreNonRemovableMedia) {
EXPECT_FALSE(delegate()->is_watching("/media/REMOVABLE/foo"));
}
TEST_F(ArcVolumeMounterBridgeTest, OnMountEventMountError) {
TEST_F(ArcVolumeMounterBridgeTest, OnMountEvent_MountError) {
// Mount event with errors are not propagated to ARC.
bridge()->OnMountEvent(DiskMountManager::MountEvent::MOUNTING,
ash::MountError::kInvalidArgument,
@ -229,7 +229,7 @@ TEST_F(ArcVolumeMounterBridgeTest, OnMountEventMountError) {
EXPECT_FALSE(delegate()->is_watching("/media/removable/FOO"));
}
TEST_F(ArcVolumeMounterBridgeTest, OnMountEventExternalStorageDisabled) {
TEST_F(ArcVolumeMounterBridgeTest, OnMountEvent_ExternalStorageDisabled) {
constexpr char kDevicePath1[] = "/dev/foo";
constexpr char kDevicePath2[] = "/dev/bar";
constexpr char kRemovableMountPath1[] = "/media/removable/FOO";
@ -265,7 +265,7 @@ TEST_F(ArcVolumeMounterBridgeTest, OnMountEventExternalStorageDisabled) {
EXPECT_FALSE(delegate()->is_watching(kRemovableMountPath1));
}
TEST_F(ArcVolumeMounterBridgeTest, OnMountEventExternalStorageAccess) {
TEST_F(ArcVolumeMounterBridgeTest, OnMountEvent_ExternalStorageAccess) {
constexpr char kDevicePath1[] = "/dev/foo";
constexpr char kDevicePath2[] = "/dev/bar";
constexpr char kRemovableMountPath1[] = "/media/removable/FOO";
@ -302,7 +302,7 @@ TEST_F(ArcVolumeMounterBridgeTest, OnMountEventExternalStorageAccess) {
EXPECT_FALSE(delegate()->is_watching(kRemovableMountPath1));
}
TEST_F(ArcVolumeMounterBridgeTest, OnMountEventVisibleToAndroidApps) {
TEST_F(ArcVolumeMounterBridgeTest, OnMountEvent_VisibleToAndroidApps) {
constexpr char kDevicePath[] = "/dev/foo";
constexpr char kMountPath[] = "/media/removable/UNTITLED";
constexpr char kFsUUID[] = "0123-abcd";
@ -370,7 +370,7 @@ TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEvents) {
DiskMountManager::MountEvent::MOUNTING);
}
TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEventsExternalStorageDisabled) {
TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEvents_ExternalStorageDisabled) {
constexpr char kDevicePath[] = "/dev/foo";
constexpr char kRemovableMountPath[] = "/media/removable/FOO";
@ -401,7 +401,7 @@ TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEventsExternalStorageDisabled) {
DiskMountManager::MountEvent::MOUNTING);
}
TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEventsExternalStorageAccess) {
TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEvents_ExternalStorageAccess) {
constexpr char kDevicePath[] = "/dev/foo";
constexpr char kRemovableMountPath[] = "/media/removable/FOO";
@ -433,7 +433,7 @@ TEST_F(ArcVolumeMounterBridgeTest, SendAllMountEventsExternalStorageAccess) {
DiskMountManager::MountEvent::MOUNTING);
}
TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPointsPContainer) {
TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPoints_P_Container) {
// Use ARC++ (container) P.
ResetArcAndroidSdkVersionForTesting(arc::kArcVersionP);
base::CommandLine::ForCurrentProcess()->RemoveSwitch(
@ -445,7 +445,7 @@ TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPointsPContainer) {
EXPECT_EQ(volume_mounter_instance()->num_on_mount_event_called(), 1);
}
TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPointsRVM) {
TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPoints_R_VM) {
// Use ARCVM R.
ResetArcAndroidSdkVersionForTesting(arc::kArcVersionR);
base::CommandLine::ForCurrentProcess()->AppendSwitch(
@ -487,7 +487,7 @@ TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPointsRVM) {
EXPECT_EQ(volume_mounter_instance()->num_on_mount_event_called(), 1);
}
TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPointsRContainer) {
TEST_F(ArcVolumeMounterBridgeTest, RequestAllMountPoints_R_Container) {
// Use ARC++ (container) R.
ResetArcAndroidSdkVersionForTesting(arc::kArcVersionR);
base::CommandLine::ForCurrentProcess()->RemoveSwitch(
@ -609,7 +609,7 @@ TEST_F(ArcVolumeMounterBridgeTest,
// Tests that DropArcCaches() can be called serially multiple times and calls
// back the correct callback.
TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesSequential) {
TEST_F(ArcVolumeMounterBridgeTest, DropArcCaches_Sequential) {
bridge()->SetUnmountTimeoutForTesting(base::TimeDelta::Max());
base::test::TestFuture<bool> future1, future2;
@ -643,7 +643,7 @@ TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesSequential) {
// Tests that DropArcCaches() can be called concurrently multiple times and
// calls back the correct callback.
TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesConcurrent) {
TEST_F(ArcVolumeMounterBridgeTest, DropArcCaches_Concurrent) {
bridge()->SetUnmountTimeoutForTesting(base::TimeDelta::Max());
base::test::TestFuture<bool> future1, future2;
@ -675,7 +675,7 @@ TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesConcurrent) {
}
// Tests the scenario where PrepareForRemovableMediaUnmount mojo call times out.
TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesTimeout) {
TEST_F(ArcVolumeMounterBridgeTest, DropArcCaches_Timeout) {
bridge()->SetUnmountTimeoutForTesting(base::TimeDelta::Max());
base::test::TestFuture<bool> future;
@ -692,7 +692,7 @@ TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesTimeout) {
}
// Tests the scenario when the device is going to sleep.
TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesSuspend) {
TEST_F(ArcVolumeMounterBridgeTest, DropArcCaches_Suspend) {
bridge()->SetUnmountTimeoutForTesting(base::TimeDelta::Max());
base::test::TestFuture<bool> future1, future2, future3, future4, future5;
@ -757,7 +757,7 @@ TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesSuspend) {
// Tests the scenario when the device suspension is canceled before ARC calls
// OnReadyToSuspend.
TEST_F(ArcVolumeMounterBridgeTest, DropArcCachesSuspendCanceled) {
TEST_F(ArcVolumeMounterBridgeTest, DropArcCaches_SuspendCanceled) {
bridge()->SetUnmountTimeoutForTesting(base::TimeDelta::Max());
base::test::TestFuture<bool> future1, future2;

@ -95,9 +95,9 @@ class ASH_EXPORT TouchCalibratorController
FRIEND_TEST_ALL_PREFIXES(TouchCalibratorControllerTest,
InternalTouchDeviceIsRejected);
FRIEND_TEST_ALL_PREFIXES(TouchCalibratorControllerTest,
MappingTwoExternalDisplaysFullFlow);
Mapping_TwoExternalDisplays_FullFlow);
FRIEND_TEST_ALL_PREFIXES(TouchCalibratorControllerTest,
MappingTwoExternalDisplaysSkipFirst);
Mapping_TwoExternalDisplays_SkipFirst);
enum class CalibrationState {
// Indicates that the touch calibration is currently active with the built

@ -246,7 +246,7 @@ TEST_F(TouchCalibratorControllerTest, StartTouchscreenMapping) {
EXPECT_TRUE(base::Contains(handlers, &touch_calibrator_controller));
}
TEST_F(TouchCalibratorControllerTest, MappingOneExternalDisplayFullFlow) {
TEST_F(TouchCalibratorControllerTest, Mapping_OneExternalDisplay_FullFlow) {
const display::Display& touch_display = InitDisplays();
TouchCalibratorController touch_calibrator_controller;
StartMappingChecks(&touch_calibrator_controller, touch_display);
@ -277,7 +277,7 @@ TEST_F(TouchCalibratorControllerTest, MappingOneExternalDisplayFullFlow) {
EXPECT_FALSE(touch_calibrator_controller.IsCalibrating());
}
TEST_F(TouchCalibratorControllerTest, MappingTwoExternalDisplaysFullFlow) {
TEST_F(TouchCalibratorControllerTest, Mapping_TwoExternalDisplays_FullFlow) {
UpdateDisplay("600x500,600x500,600x500");
display::test::DisplayManagerTestApi(Shell::Get()->display_manager())
.SetFirstDisplayAsInternalDisplay();
@ -383,7 +383,7 @@ TEST_F(TouchCalibratorControllerTest, MappingTwoExternalDisplaysFullFlow) {
EXPECT_FALSE(touch_calibrator_controller.IsCalibrating());
}
TEST_F(TouchCalibratorControllerTest, MappingTwoExternalDisplaysSkipFirst) {
TEST_F(TouchCalibratorControllerTest, Mapping_TwoExternalDisplays_SkipFirst) {
UpdateDisplay("600x500,600x500,600x500");
display::test::DisplayManagerTestApi(Shell::Get()->display_manager())
.SetFirstDisplayAsInternalDisplay();

@ -1909,7 +1909,7 @@ TEST_F(WindowTreeHostManagerTest, ReplacePrimary) {
primary_root->RemoveObserver(&test_observer);
}
TEST_F(WindowTreeHostManagerTest, UpdateMouseLocationAfterDisplayChangeNoop) {
TEST_F(WindowTreeHostManagerTest, UpdateMouseLocationAfterDisplayChange_Noop) {
UpdateDisplay("1600x1000*.9");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();

@ -478,7 +478,7 @@ TEST_F(ExtendedDesktopTest, CaptureEventLocationHighDPI) {
location_handler.release_location().ToString());
}
TEST_F(ExtendedDesktopTest, CaptureEventLocationHighDPI2) {
TEST_F(ExtendedDesktopTest, CaptureEventLocationHighDPI_2) {
UpdateDisplay("1000x600,600x400*2");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();

@ -166,7 +166,7 @@ TEST_F(FastInkHostCreateFrameUtilTest, CompositorFrameHasCorrectStructure) {
primary_display.device_scale_factor());
}
TEST_F(FastInkHostCreateFrameUtilTest, FrameDamageAutoModeOff) {
TEST_F(FastInkHostCreateFrameUtilTest, FrameDamage_AutoModeOff) {
auto frame = fast_ink_internal::CreateCompositorFrame(
viz::BeginFrameAck::CreateManualAckWithDamage(), kTestContentRectInDIP,
kTestTotalDamageRectInDIP, /*auto_update=*/false, *host_window_,
@ -186,7 +186,7 @@ TEST_F(FastInkHostCreateFrameUtilTest, FrameDamageAutoModeOff) {
gfx::Rect(0, 0, 1000, 200));
}
TEST_F(FastInkHostCreateFrameUtilTest, FrameDamageAutoModeOn) {
TEST_F(FastInkHostCreateFrameUtilTest, FrameDamage_AutoModeOn) {
auto frame = fast_ink_internal::CreateCompositorFrame(
viz::BeginFrameAck::CreateManualAckWithDamage(), kTestContentRectInDIP,
kTestTotalDamageRectInDIP, /*auto_update=*/true, *host_window_,

@ -229,7 +229,7 @@ TEST_F(FocusCyclerTest, CycleFocusNoBrowser) {
}
// Tests that focus cycles from the active browser to the status area and back.
TEST_F(FocusCyclerTest, ShelfCycleFocusForward) {
TEST_F(FocusCyclerTest, Shelf_CycleFocusForward) {
SetUpTrayFocusCycle();
InstallFocusCycleOnShelf();
GetPrimaryShelf()->hotseat_widget()->Hide();
@ -254,7 +254,7 @@ TEST_F(FocusCyclerTest, ShelfCycleFocusForward) {
EXPECT_TRUE(GetPrimaryStatusAreaWidget()->IsActive());
}
TEST_F(FocusCyclerTest, ShelfCycleFocusBackwardInvisible) {
TEST_F(FocusCyclerTest, Shelf_CycleFocusBackwardInvisible) {
SetUpTrayFocusCycle();
InstallFocusCycleOnShelf();
GetPrimaryShelf()->hotseat_widget()->Hide();
@ -380,7 +380,7 @@ TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
EXPECT_EQ(focus_manager->GetFocusedView(), view1);
}
TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanesMoveOntoNext) {
TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes_MoveOntoNext) {
SetUpTrayFocusCycle();
InstallFocusCycleOnShelf();

@ -236,7 +236,7 @@ TEST_F(FrameSinkHolderTest, ObserveBeginFrameSourceOnDemand) {
frame_sink_holder_->SetBeginFrameSource(nullptr);
}
TEST_F(FrameSinkHolderTest, ObserveBeginFrameSourceOnDemandAutoUpdate) {
TEST_F(FrameSinkHolderTest, ObserveBeginFrameSourceOnDemand_AutoUpdate) {
FrameSinkHolderTestApi test_api(frame_sink_holder_.get());
frame_sink_holder_->SetAutoUpdateMode(true);
@ -299,7 +299,7 @@ TEST_F(FrameSinkHolderTest, SubmitFrameSynchronouslyWhilePendingFrameAck) {
EXPECT_TRUE(test_api.IsPendingFrame());
}
TEST_F(FrameSinkHolderTest, HandlingAsynchronousFrameRequestsNoAutoUpdate) {
TEST_F(FrameSinkHolderTest, HandlingAsynchronousFrameRequests_NoAutoUpdate) {
FrameSinkHolderTestApi test_api(frame_sink_holder_.get());
frame_sink_holder_->OnBeginFrame(CreateValidBeginFrameArgsForTesting());

@ -48,7 +48,7 @@ class UiResourceManagerTest : public testing::Test {
std::unique_ptr<UiResourceManager> resource_manager_;
};
TEST_F(UiResourceManagerTest, ReuseResourceNoResources) {
TEST_F(UiResourceManagerTest, ReuseResource_NoResources) {
viz::ResourceId resource_id = resource_manager_->FindResourceToReuse(
gfx::Size(100, 100), viz::SinglePlaneFormat::kBGRA_8888,
kTestUiSourceId_1);
@ -126,7 +126,7 @@ TEST_F(UiResourceManagerDeathTest,
EXPECT_DCHECK_DEATH({ resource_manager_.reset(); });
}
TEST_F(UiResourceManagerTest, PrepareResourceForExportingInvalidIds) {
TEST_F(UiResourceManagerTest, PrepareResourceForExporting_InvalidIds) {
viz::ResourceId to_be_released_resource =
resource_manager_->OfferResource(std::make_unique<UiResource>());
resource_manager_->OfferResource(std::make_unique<UiResource>());
@ -183,7 +183,7 @@ TEST_F(UiResourceManagerTest, CannotExportAlreadyExportedResource) {
EXPECT_TRUE(transferable_resource.is_empty());
}
TEST_F(UiResourceManagerTest, ReleaseResourceInvalidIds) {
TEST_F(UiResourceManagerTest, ReleaseResource_InvalidIds) {
// We can only release a resource that we currently manage.
const auto released_resource =
resource_manager_->ReleaseAvailableResource(viz::ResourceId(20));

@ -1347,7 +1347,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowAvailability) {
// Verifies a not O4C resizable app in portrait mode displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitlePortraitResizable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_PortraitResizable) {
// Create an ARC game window in portrait mode that is resizable.
SetAppBounds(gfx::Rect(50, 50, 400, 700));
CreateGameWindow(/*is_arc_window=*/true);
@ -1361,7 +1361,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitlePortraitResizable) {
// Verifies a not O4C resizable app in landscape mode displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleLandscapeResizable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_LandscapeResizable) {
// Create an ARC game window in landscape mode that is resizable.
CreateGameWindow(/*is_arc_window=*/true);
game_window_->SetProperty(kArcResizeLockTypeKey,
@ -1374,7 +1374,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleLandscapeResizable) {
// Verifies a not O4C resizable app in resizable mode displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleFreeformResizable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_FreeformResizable) {
// Create an ARC game window in free resizing mode.
CreateGameWindow(/*is_arc_window=*/true);
game_window_->SetProperty(kArcResizeLockTypeKey,
@ -1387,7 +1387,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleFreeformResizable) {
// Verifies a not O4C non-resizable app in portrait mode displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitlePortraitNonTogglable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_PortraitNonTogglable) {
// Create an ARC game window that only supports portrait mode.
SetAppBounds(gfx::Rect(50, 50, 400, 700));
CreateGameWindow(/*is_arc_window=*/true);
@ -1402,7 +1402,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitlePortraitNonTogglable) {
// Verifies a not O4C non-resizable app in landscape mode displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleLandscapeNonTogglable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_LandscapeNonTogglable) {
// Create an ARC game window that only supports landscape mode.
CreateGameWindow(/*is_arc_window=*/true);
game_window_->SetProperty(kArcResizeLockTypeKey,
@ -1416,7 +1416,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleLandscapeNonTogglable) {
// Verifies a not O4C resizable app in fullscreen displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleFullscreenTogglable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_FullscreenTogglable) {
// Create an ARC game window in fullscreen that can be resized via the size
// button in the frame header.
CreateAnArcAppInFullscreen();
@ -1436,7 +1436,7 @@ TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleFullscreenTogglable) {
// Verifies a not O4C non-resizable app in fullscreen displays the expected
// description within the screen size row.
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitleFullscreenNonTogglable) {
TEST_F(GameDashboardContextTest, ScreenSizeRowSubtitle_FullscreenNonTogglable) {
// Create an ARC game window in fullscreen that can't be resized.
CreateAnArcAppInFullscreen(
/*caption_button_model=*/std::make_unique<NonResizableButtonModel>());
@ -1980,7 +1980,7 @@ TEST_F(GameDashboardContextTest,
ASSERT_FALSE(button_widget->IsVisible());
}
TEST_F(GameDashboardContextTest, GameDashboardButtonFullscreenTouchEvent) {
TEST_F(GameDashboardContextTest, GameDashboardButtonFullscreen_TouchEvent) {
CreateAnArcAppInFullscreen();
views::Widget* button_widget = test_api_->GetGameDashboardButtonWidget();
CHECK(button_widget);

@ -60,7 +60,7 @@ TEST_F(GameDashboardControllerTest, IsGame) {
}
// Verifies a non-normal window type is not a game and not being observed.
TEST_F(GameDashboardControllerTest, IsGameWindowPropertyNonNormalWindowType) {
TEST_F(GameDashboardControllerTest, IsGameWindowProperty_NonNormalWindowType) {
auto non_normal_window = CreateTestWindow(
gfx::Rect(5, 5, 20, 20), aura::client::WindowType::WINDOW_TYPE_MENU);
const auto observer =
@ -70,34 +70,34 @@ TEST_F(GameDashboardControllerTest, IsGameWindowPropertyNonNormalWindowType) {
EXPECT_FALSE(GameDashboardController::IsGameWindow(non_normal_window.get()));
}
TEST_F(GameDashboardControllerTest, IsGameWindowPropertyGameArcWindow) {
TEST_F(GameDashboardControllerTest, IsGameWindowProperty_GameArcWindow) {
// Verifies a game ARC window is a game.
CreateAppWindowAndVerifyIsGameWindowProperty(
TestGameDashboardDelegate::kGameAppId, /*expected_is_game=*/true,
chromeos::AppType::ARC_APP);
}
TEST_F(GameDashboardControllerTest, IsGameWindowPropertyAllowlistedArcWindow) {
TEST_F(GameDashboardControllerTest, IsGameWindowProperty_AllowlistedArcWindow) {
// Verifies an allowlisted ARC window is a game.
CreateAppWindowAndVerifyIsGameWindowProperty(
TestGameDashboardDelegate::kAllowlistedAppId,
/*expected_is_game=*/true, chromeos::AppType::ARC_APP);
}
TEST_F(GameDashboardControllerTest, IsGameWindowPropertyOtherArcWindow) {
TEST_F(GameDashboardControllerTest, IsGameWindowProperty_OtherArcWindow) {
// Verifies a not-game ARC window is not a game.
CreateAppWindowAndVerifyIsGameWindowProperty(
TestGameDashboardDelegate::kOtherAppId, /*expected_is_game=*/false,
chromeos::AppType::ARC_APP);
}
TEST_F(GameDashboardControllerTest, IsGameWindowPropertyGFNWindows) {
TEST_F(GameDashboardControllerTest, IsGameWindowProperty_GFNWindows) {
// Verifies a GeForceNow window is a game.
CreateAppWindowAndVerifyIsGameWindowProperty(extension_misc::kGeForceNowAppId,
/*expected_is_game=*/true);
}
TEST_F(GameDashboardControllerTest, IsGameWindowPropertyOtherWindows) {
TEST_F(GameDashboardControllerTest, IsGameWindowProperty_OtherWindows) {
// Verifies a non-game non-ARC window is not a game.
CreateAppWindowAndVerifyIsGameWindowProperty(
TestGameDashboardDelegate::kOtherAppId, /*expected_is_game=*/false);

@ -91,7 +91,7 @@ TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorState) {
}
}
TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorStateUnavailable) {
TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorState_Unavailable) {
for (const Testcase& testcase : kTestCases) {
fingerprint_auth_factor_model_->SetFingerprintState(
testcase.fingerprint_state);
@ -100,7 +100,7 @@ TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorStateUnavailable) {
}
}
TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorStateAuthResultFalse) {
TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorState_AuthResultFalse) {
for (const Testcase& testcase : kTestCases) {
fingerprint_auth_factor_model_->SetFingerprintState(
testcase.fingerprint_state);
@ -114,7 +114,7 @@ TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorStateAuthResultFalse) {
}
}
TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorStateAuthResulTrue) {
TEST_F(FingerprintAuthFactorModelTest, GetAuthFactorState_AuthResulTrue) {
for (const Testcase& testcase : kTestCases) {
fingerprint_auth_factor_model_->SetFingerprintState(
testcase.fingerprint_state);
@ -131,7 +131,7 @@ TEST_F(FingerprintAuthFactorModelTest, GetLabelId) {
}
}
TEST_F(FingerprintAuthFactorModelTest, GetLabelIdAuthResultFalse) {
TEST_F(FingerprintAuthFactorModelTest, GetLabelId_AuthResultFalse) {
for (const Testcase& testcase : kTestCases) {
fingerprint_auth_factor_model_->SetFingerprintState(
testcase.fingerprint_state);
@ -147,7 +147,7 @@ TEST_F(FingerprintAuthFactorModelTest, GetLabelIdAuthResultFalse) {
}
}
TEST_F(FingerprintAuthFactorModelTest, GetLabelIdAuthResultTrue) {
TEST_F(FingerprintAuthFactorModelTest, GetLabelId_AuthResultTrue) {
for (const Testcase& testcase : kTestCases) {
fingerprint_auth_factor_model_->SetFingerprintState(
testcase.fingerprint_state);
@ -157,7 +157,7 @@ TEST_F(FingerprintAuthFactorModelTest, GetLabelIdAuthResultTrue) {
}
}
TEST_F(FingerprintAuthFactorModelTest, GetLabelIdCanUsePin) {
TEST_F(FingerprintAuthFactorModelTest, GetLabelId_CanUsePin) {
fingerprint_auth_factor_model_->SetFingerprintState(
FingerprintState::DISABLED_FROM_TIMEOUT);
model_->set_can_use_pin(true);

@ -309,7 +309,7 @@ TEST_F(LoginAuthFactorsViewUnittest, MultipleAuthFactorsInReadyState) {
// Note: At the moment, Smart Lock is the only auth factor that uses state
// kClickRequired (hence no similar test for Fingerprint).
TEST_F(LoginAuthFactorsViewUnittest, ClickRequiredSmartLock) {
TEST_F(LoginAuthFactorsViewUnittest, ClickRequired_SmartLock) {
ui::ScopedAnimationDurationScaleMode non_zero_duration_mode(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
@ -372,7 +372,7 @@ TEST_F(LoginAuthFactorsViewUnittest, ClickingArrowButton) {
// kAuthenticated state, it should not request to hide the password field, and
// that is its final state as the screen becomes unlocked (it doesn't
// transition to any further states).
TEST_F(LoginAuthFactorsViewUnittest, AuthenticatedLockScreenFingerprint) {
TEST_F(LoginAuthFactorsViewUnittest, Authenticated_LockScreen_Fingerprint) {
GetSessionControllerClient()->SetSessionState(
session_manager::SessionState::LOCKED);
Shell::Get()->login_screen_controller()->ShowLockScreen();
@ -402,7 +402,7 @@ TEST_F(LoginAuthFactorsViewUnittest, AuthenticatedLockScreenFingerprint) {
//
// On the lock screen, kAuthenticated is its final state as the screen becomes
// unlocked (it doesn't transition to any further states).
TEST_F(LoginAuthFactorsViewUnittest, AuthenticatedLockScreenSmartLock) {
TEST_F(LoginAuthFactorsViewUnittest, Authenticated_LockScreen_SmartLock) {
GetSessionControllerClient()->SetSessionState(
session_manager::SessionState::LOCKED);
Shell::Get()->login_screen_controller()->ShowLockScreen();
@ -438,7 +438,7 @@ TEST_F(LoginAuthFactorsViewUnittest, AuthenticatedLockScreenSmartLock) {
// state (if Cryptohome fails to decrypt the user directory with the
// phone-provided decryption key). When Smart Lock transitions out of
// kAuthenticated, it should no longer request to hide the password field.
TEST_F(LoginAuthFactorsViewUnittest, AuthenticatedLoginScreenSmartLock) {
TEST_F(LoginAuthFactorsViewUnittest, Authenticated_LoginScreen_SmartLock) {
GetSessionControllerClient()->SetSessionState(
session_manager::SessionState::LOGIN_PRIMARY);
Shell::Get()->login_screen_controller()->ShowLoginScreen();
@ -579,7 +579,7 @@ TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonRequestsFocus) {
// The arrow button automatically becomes focused when Smart Lock state is
// kClickRequired. After the state changes, the button loses visibility and the
// entire view should have its focus cleared.
TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocusAuthenticated) {
TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocus_Authenticated) {
GetSessionControllerClient()->SetSessionState(
session_manager::SessionState::LOCKED);
Shell::Get()->login_screen_controller()->ShowLockScreen();
@ -593,12 +593,12 @@ TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocusAuthenticated) {
// as though the focus is not cleared and instead jumps to the password input.
// This focus happens inside LoginAuthUserView when the state change causes
// the password input to become visible.
TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocusReady) {
TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocus_Ready) {
TestArrowButtonClearsFocus(
/*state_after_click_required=*/AuthFactorState::kReady);
}
TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocusError) {
TEST_F(LoginAuthFactorsViewUnittest, ArrowButtonClearsFocus_Error) {
TestArrowButtonClearsFocus(
/*state_after_click_required=*/AuthFactorState::kErrorTemporary);
TestArrowButtonClearsFocus(

@ -117,7 +117,7 @@ class SmartLockAuthFactorModelUnittest : public AshTestBase {
bool arrow_button_tap_callback_called_ = false;
};
TEST_F(SmartLockAuthFactorModelUnittest, InitialStateConnectingToPhone) {
TEST_F(SmartLockAuthFactorModelUnittest, InitialState_ConnectingToPhone) {
auto initial_state = SmartLockState::kConnectingToPhone;
InitializeSmartLockAuthFactorModel(initial_state);
@ -128,7 +128,7 @@ TEST_F(SmartLockAuthFactorModelUnittest, InitialStateConnectingToPhone) {
EXPECT_FALSE(on_state_changed_called_);
}
TEST_F(SmartLockAuthFactorModelUnittest, InitialStateInactive) {
TEST_F(SmartLockAuthFactorModelUnittest, InitialState_Inactive) {
auto initial_state = SmartLockState::kInactive;
InitializeSmartLockAuthFactorModel(initial_state);

@ -37,15 +37,15 @@ class FastPairDecoderTest : public testing::Test {
}
};
TEST_F(FastPairDecoderTest, HasModelIdThreeByteFormat) {
TEST_F(FastPairDecoderTest, HasModelId_ThreeByteFormat) {
EXPECT_TRUE(HasModelIdString(kModelId));
}
TEST_F(FastPairDecoderTest, HasModelIdTooShort) {
TEST_F(FastPairDecoderTest, HasModelId_TooShort) {
EXPECT_FALSE(HasModelIdString("11"));
}
TEST_F(FastPairDecoderTest, HasModelIdLongFormat) {
TEST_F(FastPairDecoderTest, HasModelId_LongFormat) {
std::vector<uint8_t> bytes = FastPairServiceDataCreator::Builder()
.SetHeader(0b00001000)
.SetModelId("11223344")
@ -62,7 +62,7 @@ TEST_F(FastPairDecoderTest, HasModelIdLongFormat) {
EXPECT_TRUE(HasModelId(&bytes));
}
TEST_F(FastPairDecoderTest, HasModelIdLongInvalidVersion) {
TEST_F(FastPairDecoderTest, HasModelId_LongInvalidVersion) {
std::vector<uint8_t> bytes = FastPairServiceDataCreator::Builder()
.SetHeader(0b00101000)
.SetModelId("11223344")
@ -71,7 +71,7 @@ TEST_F(FastPairDecoderTest, HasModelIdLongInvalidVersion) {
EXPECT_FALSE(HasModelId(&bytes));
}
TEST_F(FastPairDecoderTest, HasModelIdLongInvalidLength) {
TEST_F(FastPairDecoderTest, HasModelId_LongInvalidLength) {
std::vector<uint8_t> bytes = FastPairServiceDataCreator::Builder()
.SetHeader(0b00001010)
.SetModelId("11223344")
@ -88,22 +88,22 @@ TEST_F(FastPairDecoderTest, HasModelIdLongInvalidLength) {
EXPECT_FALSE(HasModelId(&bytes));
}
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceDataNoResultForNullData) {
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceData_NoResultForNullData) {
EXPECT_EQ(GetHexModelIdFromServiceData(nullptr), std::nullopt);
}
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceDataNoResultForEmptyData) {
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceData_NoResultForEmptyData) {
std::vector<uint8_t> empty;
EXPECT_EQ(GetHexModelIdFromServiceData(&empty), std::nullopt);
}
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceDataThreeByteData) {
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceData_ThreeByteData) {
std::vector<uint8_t> bytes;
base::HexStringToBytes(kModelId, &bytes);
EXPECT_EQ(GetHexModelIdFromServiceData(&bytes), kModelId);
}
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceDataLongModelId) {
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceData_LongModelId) {
std::vector<uint8_t> service_data = FastPairServiceDataCreator::Builder()
.SetHeader(kLongModelIdHeader)
.SetModelId(kLongModelId)
@ -113,7 +113,7 @@ TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceDataLongModelId) {
EXPECT_EQ(GetHexModelIdFromServiceData(&service_data), kLongModelId);
}
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceDataLongModelIdTrimmed) {
TEST_F(FastPairDecoderTest, GetHexModelIdFromServiceData_LongModelIdTrimmed) {
std::vector<uint8_t> service_data = FastPairServiceDataCreator::Builder()
.SetHeader(kPaddedLongModelIdHeader)
.SetModelId(kPaddedModelId)

@ -88,7 +88,7 @@ class FastPairFeatureUsageMetricsLoggerTest : public ::testing::Test {
this};
};
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligibleEligible) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligible_Eligible) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
@ -99,7 +99,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligibleEligible) {
EXPECT_TRUE(feature_usage_metrics.IsEligible());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligibleIneligible) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligible_Ineligible) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/false);
@ -110,7 +110,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEligibleIneligible) {
EXPECT_FALSE(feature_usage_metrics.IsEligible());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEnabledEnabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEnabled_Enabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
@ -120,7 +120,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEnabledEnabled) {
EXPECT_TRUE(feature_usage_metrics.IsEnabled());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEnabledNotEnabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsEnabled_NotEnabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
@ -165,7 +165,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, RecordUsage) {
feature_usage::FeatureUsageMetrics::Event::kUsedWithFailure, 1);
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleUnmanagedEnabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessible_Unmanaged_Enabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
SetHardwareOffloadingStatus(
@ -176,7 +176,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleUnmanagedEnabled) {
EXPECT_TRUE(feature_usage_metrics.IsEnabled());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleUnmanagedDisabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessible_Unmanaged_Disabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
@ -188,7 +188,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleUnmanagedDisabled) {
EXPECT_FALSE(feature_usage_metrics.IsEnabled());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleManagedEnabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessible_Managed_Enabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
@ -200,7 +200,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleManagedEnabled) {
EXPECT_TRUE(feature_usage_metrics.IsEnabled());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleManagedDisabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessible_Managed_Disabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/true);
@ -212,7 +212,7 @@ TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleManagedDisabled) {
EXPECT_FALSE(feature_usage_metrics.IsEnabled());
}
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessibleIneligibleEnabled) {
TEST_F(FastPairFeatureUsageMetricsLoggerTest, IsAccessible_Ineligible_Enabled) {
FastPairFeatureUsageMetricsLogger feature_usage_metrics;
SetBluetoothIsPresent(/*present=*/false);

@ -97,7 +97,7 @@ class CompanionAppBrokerImplUnitTest : public AshTestBase,
bool launch_companion_app_notification_shown_ = false;
};
TEST_F(CompanionAppBrokerImplUnitTest, MaybeShowCompanionAppActionsDisabled) {
TEST_F(CompanionAppBrokerImplUnitTest, MaybeShowCompanionAppActions_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -136,7 +136,7 @@ TEST_F(CompanionAppBrokerImplUnitTest,
// The companion app is installed, but no browser link is supplied and guests
// can only access browser link.
TEST_F(CompanionAppBrokerImplUnitTest, NoCompanionAppNotificationGuest) {
TEST_F(CompanionAppBrokerImplUnitTest, NoCompanionAppNotification_Guest) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,
@ -159,7 +159,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, NoCompanionAppNotificationGuest) {
// If the app is installed, the user should be pointed directly toward it via
// the "Launch" notification
TEST_F(CompanionAppBrokerImplUnitTest, ShowLaunchCompanionAppInstalled) {
TEST_F(CompanionAppBrokerImplUnitTest, ShowLaunchCompanionApp_Installed) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,
@ -182,7 +182,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, ShowLaunchCompanionAppInstalled) {
// When the app is not yet installed and there is no Play store link, users
// should be directed to the browser via "Launch" notification.
TEST_F(CompanionAppBrokerImplUnitTest, ShowLaunchCompanionAppNoPlayStoreLink) {
TEST_F(CompanionAppBrokerImplUnitTest, ShowLaunchCompanionApp_NoPlayStoreLink) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,
@ -205,7 +205,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, ShowLaunchCompanionAppNoPlayStoreLink) {
// If no companion app information is provided for this device, the user cannot
// be directed to the app, so no notification will be shown.
TEST_F(CompanionAppBrokerImplUnitTest, NoCompanionAppNotificationNoAppInfo) {
TEST_F(CompanionAppBrokerImplUnitTest, NoCompanionAppNotification_NoAppInfo) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,
@ -228,7 +228,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, NoCompanionAppNotificationNoAppInfo) {
// If the app is not yet installed, the Play store link takes precedence over
// the browser link.
TEST_F(CompanionAppBrokerImplUnitTest, ShowInstallCompanionAppPlayStoreLink) {
TEST_F(CompanionAppBrokerImplUnitTest, ShowInstallCompanionApp_PlayStoreLink) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,
@ -249,7 +249,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, ShowInstallCompanionAppPlayStoreLink) {
EXPECT_FALSE(launch_companion_app_notification_shown_);
}
TEST_F(CompanionAppBrokerImplUnitTest, InstallCompanionAppDisabled) {
TEST_F(CompanionAppBrokerImplUnitTest, InstallCompanionApp_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -261,7 +261,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, InstallCompanionAppDisabled) {
// TODO(b/290816916): Update with new logic to check device metadata.
// Ensures calling InstallCompanionApp with feature enabled does not crash.
TEST_F(CompanionAppBrokerImplUnitTest, InstallCompanionAppEnabled) {
TEST_F(CompanionAppBrokerImplUnitTest, InstallCompanionApp_Enabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,
@ -274,7 +274,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, InstallCompanionAppEnabled) {
companion_app_broker_->InstallCompanionApp(test_device_);
}
TEST_F(CompanionAppBrokerImplUnitTest, LaunchCompanionAppDisabled) {
TEST_F(CompanionAppBrokerImplUnitTest, LaunchCompanionApp_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -286,7 +286,7 @@ TEST_F(CompanionAppBrokerImplUnitTest, LaunchCompanionAppDisabled) {
// TODO(b/290816916): Update with new logic to check device metadata.
// Ensures calling LaunchCompanionApp with feature enabled does not crash.
TEST_F(CompanionAppBrokerImplUnitTest, LaunchCompanionAppEnabled) {
TEST_F(CompanionAppBrokerImplUnitTest, LaunchCompanionApp_Enabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeatureWithParameters(
ash::features::kFastPairPwaCompanion,

@ -27,7 +27,7 @@ std::string DecodeKey(const std::string& encoded_key) {
class FastPairEncryptionTest : public testing::Test {};
TEST_F(FastPairEncryptionTest, EncryptBytesSuccess) {
TEST_F(FastPairEncryptionTest, EncryptBytes_Success) {
std::array<uint8_t, kBlockSizeBytes> input = {
0xF3, 0x0F, 0x4E, 0x78, 0x6C, 0x59, 0xA7, 0xBB,
0xF3, 0x87, 0x3B, 0x5A, 0x49, 0xBA, 0x97, 0xEA};
@ -39,7 +39,7 @@ TEST_F(FastPairEncryptionTest, EncryptBytesSuccess) {
EXPECT_EQ(EncryptBytes(aes_key_bytes, input), expected);
}
TEST_F(FastPairEncryptionTest, EncryptBytesFailure) {
TEST_F(FastPairEncryptionTest, EncryptBytes_Failure) {
std::array<uint8_t, kBlockSizeBytes> input = {
0xF3, 0x0F, 0x4E, 0x78, 0x6C, 0x59, 0xA7, 0xBA,
0xF3, 0x87, 0x3B, 0x5A, 0x49, 0xBA, 0x97, 0xEA};
@ -51,15 +51,15 @@ TEST_F(FastPairEncryptionTest, EncryptBytesFailure) {
EXPECT_NE(EncryptBytes(aes_key_bytes, input), expected);
}
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreementEmptyKey) {
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreement_EmptyKey) {
EXPECT_FALSE(GenerateKeysWithEcdhKeyAgreement("").has_value());
}
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreementShortKey) {
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreement_ShortKey) {
EXPECT_FALSE(GenerateKeysWithEcdhKeyAgreement("too_short").has_value());
}
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreementInvalidKey) {
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreement_InvalidKey) {
EXPECT_FALSE(
GenerateKeysWithEcdhKeyAgreement(
DecodeKey("U2PWc3FHTxah/o0YT9n1VRvtm57SNIRSXOEBXm4fdtMo+06tNoFlt8D0/"
@ -67,7 +67,7 @@ TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreementInvalidKey) {
.has_value());
}
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreementValidKey) {
TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreement_ValidKey) {
EXPECT_TRUE(
GenerateKeysWithEcdhKeyAgreement(
DecodeKey("U2PWc3FHTxah/o0YU9n1VRvtm57SNIRSXOEBXm4fdtMo+06tNoFlt8D0/"
@ -79,7 +79,7 @@ TEST_F(FastPairEncryptionTest, GenerateKeysWithEcdhKeyAgreementValidKey) {
// https://developers.google.com/nearby/fast-pair/specifications/appendix/testcases#hmac-sha256
// The spec concatenates `nonce` || `input` into a single input vector which are
// distinct here.
TEST_F(FastPairEncryptionTest, GenerateHmacSha256Success) {
TEST_F(FastPairEncryptionTest, GenerateHmacSha256_Success) {
const std::vector<uint8_t> input = {0xEE, 0x4A, 0x24, 0x83, 0x73, 0x80, 0x52,
0xE4, 0x4E, 0x9B, 0x2A, 0x14, 0x5E, 0x5D,
0xDF, 0xAA, 0x44, 0xB9, 0xE5, 0x53, 0x6A,
@ -100,7 +100,7 @@ TEST_F(FastPairEncryptionTest, GenerateHmacSha256Success) {
EXPECT_EQ(GenerateHmacSha256(secret_key, nonce, input), expected);
}
TEST_F(FastPairEncryptionTest, GenerateHmacSha256Failure) {
TEST_F(FastPairEncryptionTest, GenerateHmacSha256_Failure) {
// The first byte is 0xFF in place of 0xEE.
const std::vector<uint8_t> input = {0xFF, 0x4A, 0x24, 0x83, 0x73, 0x80, 0x52,
0xE4, 0x4E, 0x9B, 0x2A, 0x14, 0x5E, 0x5D,
@ -122,7 +122,7 @@ TEST_F(FastPairEncryptionTest, GenerateHmacSha256Failure) {
EXPECT_NE(GenerateHmacSha256(secret_key, nonce, input), expected);
}
TEST_F(FastPairEncryptionTest, GenerateHmacSha256EmptyParamCombosNoCrash) {
TEST_F(FastPairEncryptionTest, GenerateHmacSha256_EmptyParamCombos_NoCrash) {
const std::vector<uint8_t> input = {0xEE, 0x4A, 0x24, 0x83, 0x73, 0x80, 0x52,
0xE4, 0x4E, 0x9B, 0x2A, 0x14, 0x5E, 0x5D,
0xDF, 0xAA, 0x44, 0xB9, 0xE5, 0x53, 0x6A,
@ -147,7 +147,7 @@ TEST_F(FastPairEncryptionTest, GenerateHmacSha256EmptyParamCombosNoCrash) {
}
}
TEST_F(FastPairEncryptionTest, GenerateHmacSha256OneByteData) {
TEST_F(FastPairEncryptionTest, GenerateHmacSha256_OneByteData) {
const std::vector<uint8_t> input = {};
const std::array<uint8_t, kNonceSizeBytes> nonce = {0x00};
@ -167,7 +167,7 @@ TEST_F(FastPairEncryptionTest, GenerateHmacSha256OneByteData) {
// `input`, `secret_key`, `nonce`, and `expected` values taken from the Fast
// Pair spec:
// https://developers.google.com/nearby/fast-pair/specifications/appendix/testcases#aes_encryption
TEST_F(FastPairEncryptionTest, EncryptAdditionalDataSuccess) {
TEST_F(FastPairEncryptionTest, EncryptAdditionalData_Success) {
const std::vector<uint8_t> input = {0x53, 0x6F, 0x6D, 0x65, 0x6F, 0x6E, 0x65,
0x27, 0x73, 0x20, 0x47, 0x6F, 0x6F, 0x67,
0x6C, 0x65, 0x20, 0x48, 0x65, 0x61, 0x64,
@ -188,7 +188,7 @@ TEST_F(FastPairEncryptionTest, EncryptAdditionalDataSuccess) {
EXPECT_EQ(EncryptAdditionalData(secret_key, nonce, input), expected);
}
TEST_F(FastPairEncryptionTest, EncryptAdditionalDataFailure) {
TEST_F(FastPairEncryptionTest, EncryptAdditionalData_Failure) {
// The first byte is 0x54 instead of 0x53
const std::vector<uint8_t> input = {0x54, 0x6F, 0x6D, 0x65, 0x6F, 0x6E, 0x65,
0x27, 0x73, 0x20, 0x47, 0x6F, 0x6F, 0x67,
@ -210,7 +210,7 @@ TEST_F(FastPairEncryptionTest, EncryptAdditionalDataFailure) {
EXPECT_NE(EncryptAdditionalData(secret_key, nonce, input), expected);
}
TEST_F(FastPairEncryptionTest, EncryptAdditionalDataEmptyData) {
TEST_F(FastPairEncryptionTest, EncryptAdditionalData_EmptyData) {
const std::vector<uint8_t> input = {};
const std::array<uint8_t, kSecretKeySizeBytes> secret_key = {
@ -225,7 +225,7 @@ TEST_F(FastPairEncryptionTest, EncryptAdditionalDataEmptyData) {
EXPECT_EQ(EncryptAdditionalData(secret_key, nonce, input), expected);
}
TEST_F(FastPairEncryptionTest, EncryptAdditionalDataEmptyParamCombosNoCrash) {
TEST_F(FastPairEncryptionTest, EncryptAdditionalData_EmptyParamCombos_NoCrash) {
std::vector<uint8_t> input = {0x53, 0x6F, 0x6D, 0x65, 0x6F, 0x6E, 0x65,
0x27, 0x73, 0x20, 0x47, 0x6F, 0x6F, 0x67,
0x6C, 0x65, 0x20, 0x48, 0x65, 0x61, 0x64,
@ -248,7 +248,7 @@ TEST_F(FastPairEncryptionTest, EncryptAdditionalDataEmptyParamCombosNoCrash) {
}
}
TEST_F(FastPairEncryptionTest, EncryptAdditionalDataOneByteData) {
TEST_F(FastPairEncryptionTest, EncryptAdditionalData_OneByteData) {
const std::vector<uint8_t> input = {0x00};
const std::array<uint8_t, kSecretKeySizeBytes> secret_key = {

@ -157,7 +157,7 @@ class BatteryUpdateMessageHandlerTest : public testing::Test {
std::unique_ptr<BatteryUpdateMessageHandler> battery_update_message_handler_;
};
TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdateGetMessages) {
TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdate_GetMessages) {
EXPECT_EQ(std::nullopt,
bluetooth_device_->GetBatteryInfo(
device::BluetoothDevice::BatteryType::kLeftBudTrueWireless));
@ -185,7 +185,7 @@ TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdateGetMessages) {
device::BluetoothDevice::BatteryType::kCaseTrueWireless));
}
TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdateObservation) {
TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdate_Observation) {
EXPECT_EQ(std::nullopt,
bluetooth_device_->GetBatteryInfo(
device::BluetoothDevice::BatteryType::kLeftBudTrueWireless));
@ -214,7 +214,7 @@ TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdateObservation) {
device::BluetoothDevice::BatteryType::kCaseTrueWireless));
}
TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdateMultipleMessages) {
TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdate_MultipleMessages) {
EXPECT_EQ(std::nullopt,
bluetooth_device_->GetBatteryInfo(
device::BluetoothDevice::BatteryType::kLeftBudTrueWireless));
@ -292,7 +292,7 @@ TEST_F(BatteryUpdateMessageHandlerTest, BatteryUpdateMultipleMessages) {
->percentage.value());
}
TEST_F(BatteryUpdateMessageHandlerTest, NoBatteryUpdateGetMessages) {
TEST_F(BatteryUpdateMessageHandlerTest, NoBatteryUpdate_GetMessages) {
EXPECT_EQ(std::nullopt,
bluetooth_device_->GetBatteryInfo(
device::BluetoothDevice::BatteryType::kLeftBudTrueWireless));
@ -320,7 +320,7 @@ TEST_F(BatteryUpdateMessageHandlerTest, NoBatteryUpdateGetMessages) {
device::BluetoothDevice::BatteryType::kCaseTrueWireless));
}
TEST_F(BatteryUpdateMessageHandlerTest, NoBatteryUpdateObservation) {
TEST_F(BatteryUpdateMessageHandlerTest, NoBatteryUpdate_Observation) {
EXPECT_EQ(std::nullopt,
bluetooth_device_->GetBatteryInfo(
device::BluetoothDevice::BatteryType::kLeftBudTrueWireless));

@ -344,7 +344,7 @@ TEST_F(MediatorTest,
mock_scanner_broker_->NotifyDeviceFound(initial_device_);
}
TEST_F(MediatorTest, InvokesShowPairingV1) {
TEST_F(MediatorTest, InvokesShowPairing_V1) {
feature_status_tracker_->SetIsFastPairEnabled(true);
auto device = base::MakeRefCounted<Device>(kTestMetadataId, kTestAddress,
Protocol::kFastPairInitial);
@ -354,70 +354,70 @@ TEST_F(MediatorTest, InvokesShowPairingV1) {
DiscoveryAction::kPairToDevice);
}
TEST_F(MediatorTest, DoesNotInvokeShowPairingDismissedByUser) {
TEST_F(MediatorTest, DoesNotInvokeShowPairing_DismissedByUser) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairing).Times(0);
mock_ui_broker_->NotifyDiscoveryAction(initial_device_,
DiscoveryAction::kDismissedByUser);
}
TEST_F(MediatorTest, DoesNotInvokeShowPairingDismissed) {
TEST_F(MediatorTest, DoesNotInvokeShowPairing_Dismissed) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairing).Times(0);
mock_ui_broker_->NotifyDiscoveryAction(initial_device_,
DiscoveryAction::kDismissedByOs);
}
TEST_F(MediatorTest, DoesNotInvokeShowPairingLearnMore) {
TEST_F(MediatorTest, DoesNotInvokeShowPairing_LearnMore) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairing).Times(0);
mock_ui_broker_->NotifyDiscoveryAction(initial_device_,
DiscoveryAction::kLearnMore);
}
TEST_F(MediatorTest, NotifyPairFailureKeyBasedPairingCharacteristicDiscovery) {
TEST_F(MediatorTest, NotifyPairFailure_KeyBasedPairingCharacteristicDiscovery) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kKeyBasedPairingCharacteristicDiscovery);
}
TEST_F(MediatorTest, NotifyPairFailureCreateGattConnection) {
TEST_F(MediatorTest, NotifyPairFailure_CreateGattConnection) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kCreateGattConnection);
}
TEST_F(MediatorTest, NotifyPairFailureGattServiceDiscovery) {
TEST_F(MediatorTest, NotifyPairFailure_GattServiceDiscovery) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kGattServiceDiscovery);
}
TEST_F(MediatorTest, NotifyPairFailureGattServiceDiscoveryTimeout) {
TEST_F(MediatorTest, NotifyPairFailure_GattServiceDiscoveryTimeout) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kGattServiceDiscoveryTimeout);
}
TEST_F(MediatorTest, NotifyPairFailureDataEncryptorRetrieval) {
TEST_F(MediatorTest, NotifyPairFailure_DataEncryptorRetrieval) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kDataEncryptorRetrieval);
}
TEST_F(MediatorTest, NotifyPairFailurePasskeyCharacteristicDiscovery) {
TEST_F(MediatorTest, NotifyPairFailure_PasskeyCharacteristicDiscovery) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kPasskeyCharacteristicDiscovery);
}
TEST_F(MediatorTest, NotifyPairFailureAccountKeyCharacteristicDiscovery) {
TEST_F(MediatorTest, NotifyPairFailure_AccountKeyCharacteristicDiscovery) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
@ -433,7 +433,7 @@ TEST_F(MediatorTest,
PairFailure::kKeyBasedPairingCharacteristicNotifySession);
}
TEST_F(MediatorTest, NotifyPairFailurePasskeyCharacteristicNotifySession) {
TEST_F(MediatorTest, NotifyPairFailure_PasskeyCharacteristicNotifySession) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
@ -457,84 +457,84 @@ TEST_F(MediatorTest,
initial_device_, PairFailure::kPasskeyCharacteristicNotifySessionTimeout);
}
TEST_F(MediatorTest, NotifyPairFailureKeyBasedPairingCharacteristicWrite) {
TEST_F(MediatorTest, NotifyPairFailure_KeyBasedPairingCharacteristicWrite) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kKeyBasedPairingCharacteristicWrite);
}
TEST_F(MediatorTest, NotifyPairFailurePasskeyPairingCharacteristicWrite) {
TEST_F(MediatorTest, NotifyPairFailure_PasskeyPairingCharacteristicWrite) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kPasskeyPairingCharacteristicWrite);
}
TEST_F(MediatorTest, NotifyPairFailureKeyBasedPairingResponseTimeout) {
TEST_F(MediatorTest, NotifyPairFailure_KeyBasedPairingResponseTimeout) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kKeyBasedPairingResponseTimeout);
}
TEST_F(MediatorTest, NotifyPairFailurePasskeyResponseTimeout) {
TEST_F(MediatorTest, NotifyPairFailure_PasskeyResponseTimeout) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kPasskeyResponseTimeout);
}
TEST_F(MediatorTest, NotifyPairFailureKeybasedPairingResponseDecryptFailure) {
TEST_F(MediatorTest, NotifyPairFailure_KeybasedPairingResponseDecryptFailure) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kKeybasedPairingResponseDecryptFailure);
}
TEST_F(MediatorTest, NotifyPairFailureIncorrectKeyBasedPairingResponseType) {
TEST_F(MediatorTest, NotifyPairFailure_IncorrectKeyBasedPairingResponseType) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kIncorrectKeyBasedPairingResponseType);
}
TEST_F(MediatorTest, NotifyPairFailurePasskeyDecryptFailure) {
TEST_F(MediatorTest, NotifyPairFailure_PasskeyDecryptFailure) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kPasskeyDecryptFailure);
}
TEST_F(MediatorTest, NotifyPairFailureIncorrectPasskeyResponseType) {
TEST_F(MediatorTest, NotifyPairFailure_IncorrectPasskeyResponseType) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(
initial_device_, PairFailure::kIncorrectPasskeyResponseType);
}
TEST_F(MediatorTest, NotifyPairFailurePasskeyMismatch) {
TEST_F(MediatorTest, NotifyPairFailure_PasskeyMismatch) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kPasskeyMismatch);
}
TEST_F(MediatorTest, NotifyPairFailurePairingDeviceLost) {
TEST_F(MediatorTest, NotifyPairFailure_PairingDeviceLost) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kPairingDeviceLost);
}
TEST_F(MediatorTest, NotifyPairFailurePairingConnect) {
TEST_F(MediatorTest, NotifyPairFailure_PairingConnect) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
PairFailure::kPairingConnect);
}
TEST_F(MediatorTest, NotifyPairFailureAddressConnect) {
TEST_F(MediatorTest, NotifyPairFailure_AddressConnect) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPairingFailed);
mock_pairer_broker_->NotifyPairFailure(initial_device_,
@ -560,21 +560,21 @@ TEST_F(MediatorTest,
mock_scanner_broker_->NotifyDeviceFound(subsequent_device_);
}
TEST_F(MediatorTest, InvokesShowDiscoveryOnlyOneNotificationDifferentDevice) {
TEST_F(MediatorTest, InvokesShowDiscovery_OnlyOneNotification_DifferentDevice) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowDiscovery).Times(1);
mock_scanner_broker_->NotifyDeviceFound(initial_device_);
mock_scanner_broker_->NotifyDeviceFound(initial_device2_);
}
TEST_F(MediatorTest, InvokesShowDiscoveryOnlyOneNotificationSameDevice) {
TEST_F(MediatorTest, InvokesShowDiscovery_OnlyOneNotification_SameDevice) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowDiscovery).Times(1);
mock_scanner_broker_->NotifyDeviceFound(initial_device_);
mock_scanner_broker_->NotifyDeviceFound(initial_device_);
}
TEST_F(MediatorTest, DoesntInvokeShowAssociateAccountFastPairDisabled) {
TEST_F(MediatorTest, DoesntInvokeShowAssociateAccount_FastPairDisabled) {
feature_status_tracker_->SetIsFastPairEnabled(false);
EXPECT_CALL(*mock_ui_broker_, ShowAssociateAccount).Times(0);
fake_retroactive_pairing_detector_->NotifyRetroactivePairFound(
@ -598,7 +598,7 @@ TEST_F(MediatorTest,
initial_device_, AccountKeyFailure::kAccountKeyCharacteristicDiscovery);
}
TEST_F(MediatorTest, AssociateAccountKeyActionAssociateAccount) {
TEST_F(MediatorTest, AssociateAccountKeyAction_AssociateAccount) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_fast_pair_repository_, WriteAccountAssociationToFootprints);
EXPECT_CALL(*mock_ui_broker_, RemoveNotifications);
@ -608,7 +608,7 @@ TEST_F(MediatorTest, AssociateAccountKeyActionAssociateAccount) {
retroactive_device_, AssociateAccountAction::kAssociateAccount);
}
TEST_F(MediatorTest, AssociateAccountKeyActionLearnMore) {
TEST_F(MediatorTest, AssociateAccountKeyAction_LearnMore) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0);
EXPECT_CALL(*mock_ui_broker_, RemoveNotifications).Times(0);
@ -616,21 +616,21 @@ TEST_F(MediatorTest, AssociateAccountKeyActionLearnMore) {
initial_device_, AssociateAccountAction::kLearnMore);
}
TEST_F(MediatorTest, AssociateAccountKeyActionDismissedByUser) {
TEST_F(MediatorTest, AssociateAccountKeyAction_DismissedByUser) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0);
mock_ui_broker_->NotifyAssociateAccountAction(
initial_device_, AssociateAccountAction::kDismissedByUser);
}
TEST_F(MediatorTest, AssociateAccountKeyActionDismissed) {
TEST_F(MediatorTest, AssociateAccountKeyAction_Dismissed) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0);
mock_ui_broker_->NotifyAssociateAccountAction(
initial_device_, AssociateAccountAction::kDismissedByUser);
}
TEST_F(MediatorTest, CompanionAppActionDownloadAppDisabled) {
TEST_F(MediatorTest, CompanionAppAction_DownloadApp_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -645,7 +645,7 @@ TEST_F(MediatorTest, CompanionAppActionDownloadAppDisabled) {
"");
}
TEST_F(MediatorTest, CompanionAppActionDownloadAppEnabled) {
TEST_F(MediatorTest, CompanionAppAction_DownloadApp_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -655,7 +655,7 @@ TEST_F(MediatorTest, CompanionAppActionDownloadAppEnabled) {
initial_device_, CompanionAppAction::kDownloadAndLaunchApp);
}
TEST_F(MediatorTest, CompanionAppActionLaunchAppDisabled) {
TEST_F(MediatorTest, CompanionAppAction_LaunchApp_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -670,7 +670,7 @@ TEST_F(MediatorTest, CompanionAppActionLaunchAppDisabled) {
"");
}
TEST_F(MediatorTest, CompanionAppActionLaunchAppEnabled) {
TEST_F(MediatorTest, CompanionAppAction_LaunchApp_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -680,7 +680,7 @@ TEST_F(MediatorTest, CompanionAppActionLaunchAppEnabled) {
CompanionAppAction::kLaunchApp);
}
TEST_F(MediatorTest, CompanionAppActionDismissedByUserDisabled) {
TEST_F(MediatorTest, CompanionAppAction_DismissedByUser_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -695,7 +695,7 @@ TEST_F(MediatorTest, CompanionAppActionDismissedByUserDisabled) {
"");
}
TEST_F(MediatorTest, CompanionAppActionDismissedByUserEnabled) {
TEST_F(MediatorTest, CompanionAppAction_DismissedByUser_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -705,7 +705,7 @@ TEST_F(MediatorTest, CompanionAppActionDismissedByUserEnabled) {
initial_device_, CompanionAppAction::kDismissedByUser);
}
TEST_F(MediatorTest, CompanionAppActionDismissedDisabled) {
TEST_F(MediatorTest, CompanionAppAction_Dismissed_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -720,7 +720,7 @@ TEST_F(MediatorTest, CompanionAppActionDismissedDisabled) {
"");
}
TEST_F(MediatorTest, CompanionAppActionDismissedEnabled) {
TEST_F(MediatorTest, CompanionAppAction_Dismissed_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -730,21 +730,21 @@ TEST_F(MediatorTest, CompanionAppActionDismissedEnabled) {
CompanionAppAction::kDismissed);
}
TEST_F(MediatorTest, PairingFailedActionNavigateToSettings) {
TEST_F(MediatorTest, PairingFailedAction_NavigateToSettings) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0);
mock_ui_broker_->NotifyPairingFailedAction(
initial_device_, PairingFailedAction::kNavigateToSettings);
}
TEST_F(MediatorTest, PairingFailedActionDismissedByUser) {
TEST_F(MediatorTest, PairingFailedAction_DismissedByUser) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0);
mock_ui_broker_->NotifyPairingFailedAction(
initial_device_, PairingFailedAction::kDismissedByUser);
}
TEST_F(MediatorTest, PairingFailedActionDismissed) {
TEST_F(MediatorTest, PairingFailedAction_Dismissed) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_pairer_broker_, PairDevice).Times(0);
mock_ui_broker_->NotifyPairingFailedAction(initial_device_,
@ -798,7 +798,7 @@ TEST_F(MediatorTest,
delegate->SetAdapterStateController(nullptr);
}
TEST_F(MediatorTest, DiscoveryBanLogicInitialParing) {
TEST_F(MediatorTest, DiscoveryBanLogic_InitialParing) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// Simulate the device first found. When the user dismissed the notification,
@ -864,7 +864,7 @@ TEST_F(MediatorTest, DiscoveryBanLogicInitialParing) {
mock_scanner_broker_->NotifyDeviceFound(initial_device_);
}
TEST_F(MediatorTest, DiscoveryBanSubsequentParing) {
TEST_F(MediatorTest, DiscoveryBan_SubsequentParing) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// Simulate the device first found. When the user dismissed the notification,
@ -930,7 +930,7 @@ TEST_F(MediatorTest, DiscoveryBanSubsequentParing) {
mock_scanner_broker_->NotifyDeviceFound(subsequent_device_);
}
TEST_F(MediatorTest, DiscoveryBanMultipleDevices) {
TEST_F(MediatorTest, DiscoveryBan_MultipleDevices) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// Simulate the device first found. When the user dismissed the notification,
@ -968,7 +968,7 @@ TEST_F(MediatorTest, DiscoveryBanMultipleDevices) {
mock_scanner_broker_->NotifyDeviceFound(initial_device_);
}
TEST_F(MediatorTest, DiscoveryBanRetroactiveAvoidsBan) {
TEST_F(MediatorTest, DiscoveryBan_RetroactiveAvoidsBan) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// Simulate the device first found.
@ -988,7 +988,7 @@ TEST_F(MediatorTest, DiscoveryBanRetroactiveAvoidsBan) {
retroactive_device_);
}
TEST_F(MediatorTest, PersistsDeviceImagesAfterRetroactivePairFound) {
TEST_F(MediatorTest, PersistsDeviceImages_AfterRetroactivePairFound) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// We should save mac address to model ID mapping and persist images
@ -1002,7 +1002,7 @@ TEST_F(MediatorTest, PersistsDeviceImagesAfterRetroactivePairFound) {
retroactive_device_);
}
TEST_F(MediatorTest, PersistsDeviceImagesAfterDeviceInitialPaired) {
TEST_F(MediatorTest, PersistsDeviceImages_AfterDeviceInitialPaired) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// We should save mac address to model ID mapping and persist images
@ -1014,7 +1014,7 @@ TEST_F(MediatorTest, PersistsDeviceImagesAfterDeviceInitialPaired) {
mock_pairer_broker_->NotifyDevicePaired(initial_device_);
}
TEST_F(MediatorTest, PersistsDeviceImagesAfterDeviceSubsequentPaired) {
TEST_F(MediatorTest, PersistsDeviceImages_AfterDeviceSubsequentPaired) {
feature_status_tracker_->SetIsFastPairEnabled(true);
// We should save mac address to model ID mapping and persist images
@ -1035,7 +1035,7 @@ TEST_F(MediatorTest,
/*error=*/std::nullopt);
}
TEST_F(MediatorTest, NoShowAssociateAccountOnInitialPairAccountKeyWrite) {
TEST_F(MediatorTest, NoShowAssociateAccount_OnInitialPairAccountKeyWrite) {
feature_status_tracker_->SetIsFastPairEnabled(true);
initial_device_->set_account_key(kAccountKey1);
EXPECT_CALL(*mock_ui_broker_, ShowAssociateAccount).Times(0);
@ -1043,7 +1043,7 @@ TEST_F(MediatorTest, NoShowAssociateAccountOnInitialPairAccountKeyWrite) {
/*error=*/std::nullopt);
}
TEST_F(MediatorTest, ShowCompanionAppOnDevicePairedDisabled) {
TEST_F(MediatorTest, ShowCompanionApp_OnDevicePaired_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -1055,7 +1055,7 @@ TEST_F(MediatorTest, ShowCompanionAppOnDevicePairedDisabled) {
mock_pairer_broker_->NotifyDevicePaired(initial_device_);
}
TEST_F(MediatorTest, ShowCompanionAppOnDevicePairedEnabled) {
TEST_F(MediatorTest, ShowCompanionApp_OnDevicePaired_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -1065,7 +1065,7 @@ TEST_F(MediatorTest, ShowCompanionAppOnDevicePairedEnabled) {
mock_pairer_broker_->NotifyDevicePaired(initial_device_);
}
TEST_F(MediatorTest, ShowPasskeyOnDisplayPasskey) {
TEST_F(MediatorTest, ShowPasskey_OnDisplayPasskey) {
feature_status_tracker_->SetIsFastPairEnabled(true);
EXPECT_CALL(*mock_ui_broker_, ShowPasskey);
mock_pairer_broker_->NotifyDisplayPasskey(/*device name=*/std::u16string(),

@ -541,7 +541,7 @@ class QuickPairMetricsLoggerTest : public NoSessionAshTestBase {
std::unique_ptr<QuickPairMetricsLogger> metrics_logger_;
};
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiShownInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiShown_Initial) {
SimulateDiscoveryUiShown(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -590,7 +590,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiShownInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiShownSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiShown_Subsequent) {
SimulateDiscoveryUiShown(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -639,7 +639,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiShownSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissed_Initial) {
SimulateDiscoveryUiDismissed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -688,7 +688,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByUserInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByUser_Initial) {
SimulateDiscoveryUiDismissedByUser(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -737,7 +737,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByUserInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByTimeoutInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByTimeout_Initial) {
SimulateDiscoveryUiDismissedByTimeout(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -786,7 +786,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByTimeoutInitial) {
1);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissed_Subsequent) {
SimulateDiscoveryUiDismissed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -835,7 +835,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByUserSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiDismissedByUser_Subsequent) {
SimulateDiscoveryUiDismissedByUser(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -934,7 +934,7 @@ TEST_F(QuickPairMetricsLoggerTest,
1);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiConnectPressedInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiConnectPressed_Initial) {
AssertUserPairedWithFastPairPref(false);
SimulateDiscoveryUiConnectPressed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
@ -985,7 +985,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiConnectPressedInitial) {
AssertUserPairedWithFastPairPref(true);
}
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiConnectPressedSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiConnectPressed_Subsequent) {
AssertUserPairedWithFastPairPref(false);
SimulateDiscoveryUiConnectPressed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
@ -1036,7 +1036,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogDiscoveryUiConnectPressedSubsequent) {
AssertUserPairedWithFastPairPref(true);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairingFailedInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogPairingFailed_Initial) {
SimulatePairingFailed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1085,7 +1085,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairingFailedInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairingFailedSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogPairingFailed_Subsequent) {
SimulatePairingFailed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1134,7 +1134,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairingFailedSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairingSucceededInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogPairingSucceeded_Initial) {
SimulatePairingSucceeded(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1183,7 +1183,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairingSucceededInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairingSucceededSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogPairingSucceeded_Subsequent) {
SimulatePairingSucceeded(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1232,7 +1232,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairingSucceededSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnelInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnel_Initial) {
SimulatePairingFlow(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
@ -1267,7 +1267,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnelInitial) {
1);
}
TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnelRetroactive) {
TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnel_Retroactive) {
SimulatePairingFlow(Protocol::kFastPairRetroactive);
base::RunLoop().RunUntilIdle();
@ -1303,7 +1303,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnelRetroactive) {
1);
}
TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnelSubseqent) {
TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnel_Subseqent) {
SimulatePairingFlow(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
@ -1334,7 +1334,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogSuccessFunnelSubseqent) {
1);
}
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissed_Initial) {
SimulateErrorUiDismissed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1383,7 +1383,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedByUserInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedByUser_Initial) {
SimulateErrorUiDismissedByUser(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1432,7 +1432,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedByUserInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissed_Subsequent) {
SimulateErrorUiDismissed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1481,7 +1481,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedByUserSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedByUser_Subsequent) {
SimulateErrorUiDismissedByUser(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1530,7 +1530,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogErrorUiDismissedByUserSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiSettingsPressedInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiSettingsPressed_Initial) {
SimulateErrorUiSettingsPressed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1579,7 +1579,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogErrorUiSettingsPressedInitial) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiSettingsPressedSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogErrorUiSettingsPressed_Subsequent) {
SimulateErrorUiSettingsPressed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(histogram_tester().GetBucketCount(
@ -1628,7 +1628,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogErrorUiSettingsPressedSubsequent) {
0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairTimeInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogPairTime_Initial) {
SimulateDiscoveryUiConnectPressed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
histogram_tester().ExpectTotalCount(kFastPairPairTimeMetricInitial, 0);
@ -1638,7 +1638,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairTimeInitial) {
histogram_tester().ExpectTotalCount(kFastPairPairTimeMetricInitial, 1);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairTimeSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogPairTime_Subsequent) {
SimulateDiscoveryUiConnectPressed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();
histogram_tester().ExpectTotalCount(kFastPairPairTimeMetricSubsequent, 0);
@ -2164,7 +2164,7 @@ TEST_F(QuickPairMetricsLoggerTest,
0);
}
TEST_F(QuickPairMetricsLoggerTest, DevicedPairedFastPair) {
TEST_F(QuickPairMetricsLoggerTest, DevicedPaired_FastPair) {
EXPECT_EQ(histogram_tester().GetBucketCount(kPairingMethodMetric,
PairingMethod::kFastPair),
0);
@ -2216,7 +2216,7 @@ TEST_F(QuickPairMetricsLoggerTest, DevicePaired) {
1);
}
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyInitial) {
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKey_Initial) {
histogram_tester().ExpectTotalCount(kRetroactivePairingResultMetric, 0);
histogram_tester().ExpectTotalCount(
kFastPairAccountKeyWriteResultMetricInitial, 0);
@ -2238,7 +2238,7 @@ TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyInitial) {
kFastPairAccountKeyWriteFailureMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyRetroactive) {
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKey_Retroactive) {
histogram_tester().ExpectTotalCount(kRetroactivePairingResultMetric, 0);
histogram_tester().ExpectTotalCount(
kFastPairAccountKeyWriteResultMetricInitial, 0);
@ -2260,7 +2260,7 @@ TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyRetroactive) {
kFastPairAccountKeyWriteFailureMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyFailureRetroactive) {
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyFailure_Retroactive) {
histogram_tester().ExpectTotalCount(kRetroactivePairingResultMetric, 0);
histogram_tester().ExpectTotalCount(
kFastPairAccountKeyWriteResultMetricInitial, 0);
@ -2282,7 +2282,7 @@ TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyFailureRetroactive) {
kFastPairAccountKeyWriteFailureMetricRetroactive, 1);
}
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyFailureInitial) {
TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyFailure_Initial) {
histogram_tester().ExpectTotalCount(kRetroactivePairingResultMetric, 0);
histogram_tester().ExpectTotalCount(
kFastPairAccountKeyWriteResultMetricInitial, 0);
@ -2304,7 +2304,7 @@ TEST_F(QuickPairMetricsLoggerTest, WriteAccountKeyFailureInitial) {
kFastPairAccountKeyWriteFailureMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairFailureInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogPairFailure_Initial) {
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricInitial, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricSubsequent, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricRetroactive, 0);
@ -2322,7 +2322,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairFailureInitial) {
histogram_tester().ExpectTotalCount(kFastPairPairResultMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairSuccessInitial) {
TEST_F(QuickPairMetricsLoggerTest, LogPairSuccess_Initial) {
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricInitial, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricSubsequent, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricRetroactive, 0);
@ -2340,7 +2340,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairSuccessInitial) {
histogram_tester().ExpectTotalCount(kFastPairPairResultMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairFailureSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogPairFailure_Subsequent) {
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricInitial, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricSubsequent, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricRetroactive, 0);
@ -2358,7 +2358,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairFailureSubsequent) {
histogram_tester().ExpectTotalCount(kFastPairPairResultMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairSuccessSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, LogPairSuccess_Subsequent) {
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricInitial, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricSubsequent, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricRetroactive, 0);
@ -2376,7 +2376,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairSuccessSubsequent) {
histogram_tester().ExpectTotalCount(kFastPairPairResultMetricRetroactive, 0);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairFailureRetroactive) {
TEST_F(QuickPairMetricsLoggerTest, LogPairFailure_Retroactive) {
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricInitial, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricSubsequent, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricRetroactive, 0);
@ -2394,7 +2394,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairFailureRetroactive) {
histogram_tester().ExpectTotalCount(kFastPairPairResultMetricRetroactive, 1);
}
TEST_F(QuickPairMetricsLoggerTest, LogPairSuccessRetroactive) {
TEST_F(QuickPairMetricsLoggerTest, LogPairSuccess_Retroactive) {
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricInitial, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricSubsequent, 0);
histogram_tester().ExpectTotalCount(kFastPairPairFailureMetricRetroactive, 0);
@ -2412,7 +2412,7 @@ TEST_F(QuickPairMetricsLoggerTest, LogPairSuccessRetroactive) {
histogram_tester().ExpectTotalCount(kFastPairPairResultMetricRetroactive, 1);
}
TEST_F(QuickPairMetricsLoggerTest, DiscoveryLearnMorePressedInitial) {
TEST_F(QuickPairMetricsLoggerTest, DiscoveryLearnMorePressed_Initial) {
SimulateDiscoveryUiLearnMorePressed(Protocol::kFastPairInitial);
base::RunLoop().RunUntilIdle();
@ -2524,7 +2524,7 @@ TEST_F(QuickPairMetricsLoggerTest,
1);
}
TEST_F(QuickPairMetricsLoggerTest, DiscoveryLearnMorePressedSubsequent) {
TEST_F(QuickPairMetricsLoggerTest, DiscoveryLearnMorePressed_Subsequent) {
SimulateDiscoveryUiLearnMorePressed(Protocol::kFastPairSubsequent);
base::RunLoop().RunUntilIdle();

@ -210,7 +210,7 @@ class MessageStreamLookupImplTest : public testing::Test,
std::unique_ptr<MessageStreamLookup> message_stream_lookup_;
};
TEST_F(MessageStreamLookupImplTest, ConnectDeviceNoMessageStreamUUid) {
TEST_F(MessageStreamLookupImplTest, ConnectDevice_NoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -227,7 +227,7 @@ TEST_F(MessageStreamLookupImplTest, ConnectDeviceNoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
}
TEST_F(MessageStreamLookupImplTest, DeviceAddedNoMessageStreamUUid) {
TEST_F(MessageStreamLookupImplTest, DeviceAdded_NoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -244,7 +244,7 @@ TEST_F(MessageStreamLookupImplTest, DeviceAddedNoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
}
TEST_F(MessageStreamLookupImplTest, DeviceAddedNotPaired) {
TEST_F(MessageStreamLookupImplTest, DeviceAdded_NotPaired) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -263,7 +263,7 @@ TEST_F(MessageStreamLookupImplTest, DeviceAddedNotPaired) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
}
TEST_F(MessageStreamLookupImplTest, DeviceChangedNoMessageStreamUUid) {
TEST_F(MessageStreamLookupImplTest, DeviceChanged_NoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -280,7 +280,7 @@ TEST_F(MessageStreamLookupImplTest, DeviceChangedNoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
}
TEST_F(MessageStreamLookupImplTest, DeviceChangedNotPaired) {
TEST_F(MessageStreamLookupImplTest, DeviceChanged_NotPaired) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -299,7 +299,7 @@ TEST_F(MessageStreamLookupImplTest, DeviceChangedNotPaired) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
}
TEST_F(MessageStreamLookupImplTest, DevicePairedNoMessageStreamUUid) {
TEST_F(MessageStreamLookupImplTest, DevicePaired_NoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -316,14 +316,14 @@ TEST_F(MessageStreamLookupImplTest, DevicePairedNoMessageStreamUUid) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
}
TEST_F(MessageStreamLookupImplTest, DevicePairedChangedNoDevice) {
TEST_F(MessageStreamLookupImplTest, DevicePairedChanged_NoDevice) {
EXPECT_EQ(GetMessageStream(), nullptr);
EmptyDevicePairedChanged(/*new_paired_status=*/true);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(GetMessageStream(), nullptr);
}
TEST_F(MessageStreamLookupImplTest, ConnectDeviceConnectToServiceFailure) {
TEST_F(MessageStreamLookupImplTest, ConnectDevice_ConnectToServiceFailure) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -341,7 +341,7 @@ TEST_F(MessageStreamLookupImplTest, ConnectDeviceConnectToServiceFailure) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 1);
}
TEST_F(MessageStreamLookupImplTest, DeviceAddedConnectToServiceFailure) {
TEST_F(MessageStreamLookupImplTest, DeviceAdded_ConnectToServiceFailure) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -379,7 +379,7 @@ TEST_F(MessageStreamLookupImplTest,
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 1);
}
TEST_F(MessageStreamLookupImplTest, DeviceChangedConnectToServiceFailure) {
TEST_F(MessageStreamLookupImplTest, DeviceChanged_ConnectToServiceFailure) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -397,7 +397,7 @@ TEST_F(MessageStreamLookupImplTest, DeviceChangedConnectToServiceFailure) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 1);
}
TEST_F(MessageStreamLookupImplTest, ConnectDeviceConnectToServiceSuccess) {
TEST_F(MessageStreamLookupImplTest, ConnectDevice_ConnectToServiceSuccess) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -432,7 +432,7 @@ TEST_F(MessageStreamLookupImplTest,
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 1);
}
TEST_F(MessageStreamLookupImplTest, DeviceAddedConnectToServiceSuccess) {
TEST_F(MessageStreamLookupImplTest, DeviceAdded_ConnectToServiceSuccess) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -449,7 +449,7 @@ TEST_F(MessageStreamLookupImplTest, DeviceAddedConnectToServiceSuccess) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 1);
}
TEST_F(MessageStreamLookupImplTest, DeviceChangedConnectToServiceSuccess) {
TEST_F(MessageStreamLookupImplTest, DeviceChanged_ConnectToServiceSuccess) {
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceError, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceTime, 0);
histogram_tester().ExpectTotalCount(kMessageStreamConnectToServiceResult, 0);
@ -507,7 +507,7 @@ TEST_F(MessageStreamLookupImplTest,
EXPECT_NE(message_stream_, nullptr);
}
TEST_F(MessageStreamLookupImplTest, ConnectDeviceDisconnectDevice) {
TEST_F(MessageStreamLookupImplTest, ConnectDevice_DisconnectDevice) {
device_->AddUUID(kMessageStreamUuid);
EXPECT_EQ(GetMessageStream(), nullptr);
@ -519,7 +519,7 @@ TEST_F(MessageStreamLookupImplTest, ConnectDeviceDisconnectDevice) {
EXPECT_EQ(GetMessageStream(), nullptr);
}
TEST_F(MessageStreamLookupImplTest, PairDeviceUnpairDevice) {
TEST_F(MessageStreamLookupImplTest, PairDevice_UnpairDevice) {
device_->AddUUID(kMessageStreamUuid);
device_->SetConnected(true);
EXPECT_EQ(device_->IsConnected(), true);
@ -533,7 +533,7 @@ TEST_F(MessageStreamLookupImplTest, PairDeviceUnpairDevice) {
EXPECT_EQ(GetMessageStream(), nullptr);
}
TEST_F(MessageStreamLookupImplTest, DevicePairedChangedNotConnected) {
TEST_F(MessageStreamLookupImplTest, DevicePairedChanged_NotConnected) {
device_->AddUUID(kMessageStreamUuid);
device_->SetConnected(false);
EXPECT_EQ(GetMessageStream(), nullptr);
@ -543,7 +543,7 @@ TEST_F(MessageStreamLookupImplTest, DevicePairedChangedNotConnected) {
EXPECT_EQ(message_stream_, nullptr);
}
TEST_F(MessageStreamLookupImplTest, AddDeviceRemoveDevice) {
TEST_F(MessageStreamLookupImplTest, AddDevice_RemoveDevice) {
device_->AddUUID(kMessageStreamUuid);
EXPECT_EQ(GetMessageStream(), nullptr);
@ -555,7 +555,7 @@ TEST_F(MessageStreamLookupImplTest, AddDeviceRemoveDevice) {
EXPECT_EQ(GetMessageStream(), nullptr);
}
TEST_F(MessageStreamLookupImplTest, RemoveDeviceNoMessageStream) {
TEST_F(MessageStreamLookupImplTest, RemoveDevice_NoMessageStream) {
device_->AddUUID(kMessageStreamUuid);
EXPECT_EQ(GetMessageStream(), nullptr);

@ -286,7 +286,7 @@ class MessageStreamTest : public testing::Test, public MessageStream::Observer {
uint8_t sdk_version_ = 0;
};
TEST_F(MessageStreamTest, ReceiveMessagesObservationSuccessfulMessage) {
TEST_F(MessageStreamTest, ReceiveMessages_Observation_SuccessfulMessage) {
histogram_tester().ExpectTotalCount(kMessageStreamReceiveResultMetric, 0);
histogram_tester().ExpectTotalCount(kMessageStreamReceiveErrorMetric, 0);
@ -305,7 +305,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesObservationSuccessfulMessage) {
histogram_tester().ExpectTotalCount(kMessageStreamReceiveErrorMetric, 0);
}
TEST_F(MessageStreamTest, ReceiveMessagesObservationNullMessage) {
TEST_F(MessageStreamTest, ReceiveMessages_Observation_NullMessage) {
histogram_tester().ExpectTotalCount(kMessageStreamReceiveResultMetric, 0);
histogram_tester().ExpectTotalCount(kMessageStreamReceiveErrorMetric, 0);
@ -324,7 +324,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesObservationNullMessage) {
histogram_tester().ExpectTotalCount(kMessageStreamReceiveErrorMetric, 0);
}
TEST_F(MessageStreamTest, ReceiveMessagesGetMessages) {
TEST_F(MessageStreamTest, ReceiveMessages_GetMessages) {
EXPECT_TRUE(model_id_.empty());
EXPECT_TRUE(message_stream_->messages().empty());
@ -336,7 +336,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesGetMessages) {
EXPECT_EQ(message_stream_->messages()[0]->get_model_id(), kModelIdString);
}
TEST_F(MessageStreamTest, ReceiveMessagesCleanUp) {
TEST_F(MessageStreamTest, ReceiveMessages_CleanUp) {
EXPECT_TRUE(model_id_.empty());
EXPECT_TRUE(message_stream_->messages().empty());
@ -351,7 +351,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesCleanUp) {
EXPECT_TRUE(on_destroyed_);
}
TEST_F(MessageStreamTest, ReceiveMessagesSocketDisconnect) {
TEST_F(MessageStreamTest, ReceiveMessages_SocketDisconnect) {
histogram_tester().ExpectTotalCount(kMessageStreamReceiveResultMetric, 0);
histogram_tester().ExpectTotalCount(kMessageStreamReceiveErrorMetric, 0);
@ -388,7 +388,7 @@ TEST_F(MessageStreamTest,
message_stream_->Disconnect(callback.Get());
}
TEST_F(MessageStreamTest, ReceiveMessagesFailureAfterMaxRetries) {
TEST_F(MessageStreamTest, ReceiveMessages_FailureAfterMaxRetries) {
EXPECT_FALSE(on_socket_disconnected_);
EXPECT_TRUE(message_stream_->messages().empty());
@ -419,7 +419,7 @@ TEST_F(MessageStreamTest,
EXPECT_EQ(ble_address_, kBleAddressString);
}
TEST_F(MessageStreamTest, ReceiveMessagesGetMultipleMessages) {
TEST_F(MessageStreamTest, ReceiveMessages_GetMultipleMessages) {
EXPECT_TRUE(model_id_.empty());
EXPECT_TRUE(ble_address_.empty());
EXPECT_TRUE(message_stream_->messages().empty());
@ -434,7 +434,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesGetMultipleMessages) {
kBleAddressString);
}
TEST_F(MessageStreamTest, ReceiveMessagesBatteryUpdate) {
TEST_F(MessageStreamTest, ReceiveMessages_BatteryUpdate) {
EXPECT_FALSE(battery_update_);
EXPECT_TRUE(message_stream_->messages().empty());
@ -447,7 +447,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesBatteryUpdate) {
EXPECT_TRUE(battery_update_);
}
TEST_F(MessageStreamTest, ReceiveMessagesRemainingBatteryTime) {
TEST_F(MessageStreamTest, ReceiveMessages_RemainingBatteryTime) {
EXPECT_EQ(remaining_battery_time_, 0);
EXPECT_TRUE(message_stream_->messages().empty());
@ -460,7 +460,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesRemainingBatteryTime) {
EXPECT_EQ(remaining_battery_time_, 271);
}
TEST_F(MessageStreamTest, ReceiveMessagesActiveComponents) {
TEST_F(MessageStreamTest, ReceiveMessages_ActiveComponents) {
EXPECT_EQ(active_components_byte_, 0x0F);
EXPECT_TRUE(message_stream_->messages().empty());
@ -473,7 +473,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesActiveComponents) {
EXPECT_EQ(active_components_byte_, 0x03);
}
TEST_F(MessageStreamTest, ReceiveMessagesSdkVersion) {
TEST_F(MessageStreamTest, ReceiveMessages_SdkVersion) {
EXPECT_EQ(sdk_version_, 0);
EXPECT_TRUE(message_stream_->messages().empty());
@ -486,7 +486,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesSdkVersion) {
EXPECT_EQ(sdk_version_, 28);
}
TEST_F(MessageStreamTest, ReceiveMessagesRingDevice) {
TEST_F(MessageStreamTest, ReceiveMessages_RingDevice) {
EXPECT_FALSE(ring_device_);
EXPECT_TRUE(message_stream_->messages().empty());
@ -499,7 +499,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesRingDevice) {
EXPECT_TRUE(ring_device_);
}
TEST_F(MessageStreamTest, ReceiveMessagesEnableSilenceMode) {
TEST_F(MessageStreamTest, ReceiveMessages_EnableSilenceMode) {
EXPECT_FALSE(enable_silence_mode_);
EXPECT_TRUE(message_stream_->messages().empty());
@ -512,7 +512,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesEnableSilenceMode) {
EXPECT_TRUE(enable_silence_mode_);
}
TEST_F(MessageStreamTest, ReceiveMessagesCompanionAppLogBuffer) {
TEST_F(MessageStreamTest, ReceiveMessages_CompanionAppLogBuffer) {
EXPECT_FALSE(log_buffer_full_);
EXPECT_TRUE(message_stream_->messages().empty());
@ -525,7 +525,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesCompanionAppLogBuffer) {
EXPECT_TRUE(log_buffer_full_);
}
TEST_F(MessageStreamTest, ReceiveMessagesNak) {
TEST_F(MessageStreamTest, ReceiveMessages_Nak) {
EXPECT_FALSE(acknowledgement_);
EXPECT_TRUE(message_stream_->messages().empty());
@ -538,7 +538,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesNak) {
EXPECT_TRUE(acknowledgement_);
}
TEST_F(MessageStreamTest, ReceiveMessagesEmptyBufferSuccessReceive) {
TEST_F(MessageStreamTest, ReceiveMessages_EmptyBuffer_SuccessReceive) {
EXPECT_TRUE(message_stream_->messages().empty());
SetEmptyBuffer();
@ -553,7 +553,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesEmptyBufferSuccessReceive) {
EXPECT_FALSE(message_stream_->messages().empty());
}
TEST_F(MessageStreamTest, ReceiveMessagesEmptyBufferErrorReceive) {
TEST_F(MessageStreamTest, ReceiveMessages_EmptyBuffer_ErrorReceive) {
EXPECT_TRUE(message_stream_->messages().empty());
SetEmptyBuffer();
@ -567,7 +567,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesEmptyBufferErrorReceive) {
EXPECT_TRUE(message_stream_->messages().empty());
}
TEST_F(MessageStreamTest, ReceiveMessagesBufferFull) {
TEST_F(MessageStreamTest, ReceiveMessages_BufferFull) {
EXPECT_TRUE(model_id_.empty());
EXPECT_TRUE(ble_address_.empty());
@ -583,7 +583,7 @@ TEST_F(MessageStreamTest, ReceiveMessagesBufferFull) {
kMessageStorageCapacity);
}
TEST_F(MessageStreamTest, UtilityProcessStoppedRetrySuccess) {
TEST_F(MessageStreamTest, UtilityProcessStopped_RetrySuccess) {
EXPECT_TRUE(message_stream_->messages().empty());
fake_process_manager_->SetProcessStopped(true);
SetSuccessMessageStreamMessage(kModelIdBytes);

@ -513,7 +513,7 @@ class FastPairPairerImplTest : public AshTestBase {
base::WeakPtrFactory<FastPairPairerImplTest> weak_ptr_factory_{this};
};
TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccessInitial) {
TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccess_Initial) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -523,7 +523,7 @@ TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccessInitial) {
EXPECT_EQ(GetPairFailure(), std::nullopt);
}
TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccessRetroactive) {
TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccess_Retroactive) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -533,7 +533,7 @@ TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccessRetroactive) {
EXPECT_EQ(GetPairFailure(), std::nullopt);
}
TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccessSubsequent) {
TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccess_Subsequent) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -545,7 +545,7 @@ TEST_F(FastPairPairerImplTest, NoCallbackIsInvokedOnGattSuccessSubsequent) {
// PairByDevice refers to the fact that we aren't pairing by address, unlike
// most other tests in this file.
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectFailureInitial) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_ConnectFailure_Initial) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kPairDeviceResult, 0);
@ -563,7 +563,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectFailureInitial) {
// PairByDevice refers to the fact that we aren't pairing by address, unlike
// most other tests in this file.
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectFailureSubsequent) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_ConnectFailure_Subsequent) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kPairDeviceResult, 0);
@ -581,7 +581,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectFailureSubsequent) {
// PairByDevice refers to the fact that we aren't pairing by address, unlike
// most other tests in this file.
TEST_F(FastPairPairerImplTest, PairByDeviceFailureInitial) {
TEST_F(FastPairPairerImplTest, PairByDeviceFailure_Initial) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kPairDeviceResult, 0);
@ -596,7 +596,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceFailureInitial) {
histogram_tester().ExpectTotalCount(kPairDeviceErrorReason, 1);
}
TEST_F(FastPairPairerImplTest, PairByDeviceFailureInitialCancelsPairing) {
TEST_F(FastPairPairerImplTest, PairByDeviceFailure_Initial_CancelsPairing) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -612,7 +612,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceFailureInitialCancelsPairing) {
EXPECT_CALL(*fake_bluetooth_device_ptr_, CancelPairing()).Times(1);
}
TEST_F(FastPairPairerImplTest, PairByDeviceFailureSubsequent) {
TEST_F(FastPairPairerImplTest, PairByDeviceFailure_Subsequent) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kPairDeviceResult, 0);
@ -630,7 +630,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceFailureSubsequent) {
{FastPairProtocolPairingSteps::kPairingStarted});
}
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessInitial) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_Initial) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -647,7 +647,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceSuccessInitial) {
histogram_tester().ExpectTotalCount(kCreateBondTime, 1);
}
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessInitialFloss) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_Initial_Floss) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/
@ -671,7 +671,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceSuccessInitialFloss) {
histogram_tester().ExpectTotalCount(kCreateBondTime, 1);
}
TEST_F(FastPairPairerImplTest, PairByBLEDeviceSuccessInitial) {
TEST_F(FastPairPairerImplTest, PairByBLEDeviceSuccess_Initial) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/
@ -791,7 +791,7 @@ TEST_F(FastPairPairerImplTest,
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessInitialAlreadyFastPaired) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_Initial_AlreadyFastPaired) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -870,7 +870,7 @@ TEST_F(FastPairPairerImplTest,
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessSubsequent) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_Subsequent) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -886,7 +886,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceSuccessSubsequent) {
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, ConnectFailureInitial) {
TEST_F(FastPairPairerImplTest, ConnectFailure_Initial) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kConnectDeviceResult, 0);
@ -908,7 +908,7 @@ TEST_F(FastPairPairerImplTest, ConnectFailureInitial) {
{FastPairProtocolPairingSteps::kPairingStarted});
}
TEST_F(FastPairPairerImplTest, ConnectFailureSubsequent) {
TEST_F(FastPairPairerImplTest, ConnectFailure_Subsequent) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kConnectDeviceResult, 0);
@ -929,7 +929,7 @@ TEST_F(FastPairPairerImplTest, ConnectFailureSubsequent) {
{FastPairProtocolPairingSteps::kPairingStarted});
}
TEST_F(FastPairPairerImplTest, ConnectSuccessInitial) {
TEST_F(FastPairPairerImplTest, ConnectSuccess_Initial) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kWritePasskeyCharacteristicResultMetric,
@ -956,7 +956,7 @@ TEST_F(FastPairPairerImplTest, ConnectSuccessInitial) {
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, ConnectSuccessSubsequent) {
TEST_F(FastPairPairerImplTest, ConnectSuccess_Subsequent) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kWritePasskeyCharacteristicResultMetric,
@ -983,7 +983,7 @@ TEST_F(FastPairPairerImplTest, ConnectSuccessSubsequent) {
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyFailureInitial) {
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyFailure_Initial) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kWritePasskeyCharacteristicResultMetric,
@ -1016,7 +1016,7 @@ TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyFailureInitial) {
FastPairProtocolPairingSteps::kRecievedPasskeyResponse});
}
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyFailureSubsequent) {
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyFailure_Subsequent) {
Login(user_manager::UserType::kRegular);
histogram_tester().ExpectTotalCount(kWritePasskeyCharacteristicResultMetric,
@ -1188,7 +1188,7 @@ TEST_F(FastPairPairerImplTest,
FastPairProtocolPairingSteps::kRecievedPasskeyResponse});
}
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyMismatchInitial) {
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyMismatch_Initial) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1215,7 +1215,7 @@ TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyMismatchInitial) {
FastPairProtocolPairingSteps::kPasskeyValidated});
}
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyMismatchSubsequent) {
TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyMismatch_Subsequent) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1242,7 +1242,7 @@ TEST_F(FastPairPairerImplTest, ParseDecryptedPasskeyMismatchSubsequent) {
FastPairProtocolPairingSteps::kPasskeyValidated});
}
TEST_F(FastPairPairerImplTest, PairedDeviceLostInitial) {
TEST_F(FastPairPairerImplTest, PairedDeviceLost_Initial) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1273,7 +1273,7 @@ TEST_F(FastPairPairerImplTest, PairedDeviceLostInitial) {
FastPairProtocolPairingSteps::kPasskeyConfirmed});
}
TEST_F(FastPairPairerImplTest, PairedDeviceLostSubsequent) {
TEST_F(FastPairPairerImplTest, PairedDeviceLost_Subsequent) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1304,7 +1304,7 @@ TEST_F(FastPairPairerImplTest, PairedDeviceLostSubsequent) {
FastPairProtocolPairingSteps::kPasskeyConfirmed});
}
TEST_F(FastPairPairerImplTest, PairSuccessInitial) {
TEST_F(FastPairPairerImplTest, PairSuccess_Initial) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1336,7 +1336,7 @@ TEST_F(FastPairPairerImplTest, PairSuccessInitial) {
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, PairSuccessInitialFloss) {
TEST_F(FastPairPairerImplTest, PairSuccess_Initial_Floss) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/
@ -1400,7 +1400,7 @@ TEST_F(FastPairPairerImplTest, BleDeviceLostMidPair) {
EXPECT_FALSE(IsDevicePaired());
}
TEST_F(FastPairPairerImplTest, PairSuccessInitialFactoryCreate) {
TEST_F(FastPairPairerImplTest, PairSuccess_Initial_FactoryCreate) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1423,7 +1423,7 @@ TEST_F(FastPairPairerImplTest, PairSuccessInitialFactoryCreate) {
adapter_->NotifyDevicePairedChanged(fake_bluetooth_device_ptr_, true);
}
TEST_F(FastPairPairerImplTest, PairSuccessSubsequentFlagEnabled) {
TEST_F(FastPairPairerImplTest, PairSuccess_Subsequent_FlagEnabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1463,7 +1463,7 @@ TEST_F(FastPairPairerImplTest, PairSuccessSubsequentFlagEnabled) {
FastPairProtocolPairingSteps::kDeviceConnected});
}
TEST_F(FastPairPairerImplTest, PairSuccessSubsequentFlagDisabled) {
TEST_F(FastPairPairerImplTest, PairSuccess_Subsequent_FlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1494,7 +1494,7 @@ TEST_F(FastPairPairerImplTest, PairSuccessSubsequentFlagDisabled) {
adapter_->NotifyDevicePairedChanged(fake_bluetooth_device_ptr_, true);
}
TEST_F(FastPairPairerImplTest, PairSuccessSubsequentStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, PairSuccess_Subsequent_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1524,7 +1524,7 @@ TEST_F(FastPairPairerImplTest, PairSuccessSubsequentStrictFlagDisabled) {
adapter_->NotifyDevicePairedChanged(fake_bluetooth_device_ptr_, true);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialFlagEnabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_FlagEnabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1567,7 +1567,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialFlagEnabled) {
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_FlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1610,7 +1610,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialFlagDisabled) {
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1652,7 +1652,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialStrictFlagDisabled) {
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialGuestLoggedIn) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_GuestLoggedIn) {
Login(user_manager::UserType::kGuest);
histogram_tester().ExpectTotalCount(
@ -1685,7 +1685,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialGuestLoggedIn) {
1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialKioskAppLoggedIn) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_KioskAppLoggedIn) {
Login(user_manager::UserType::kKioskApp);
histogram_tester().ExpectTotalCount(
@ -1714,7 +1714,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialKioskAppLoggedIn) {
kWriteAccountKeyCharacteristicResultMetric, 0);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialNotLoggedIn) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_NotLoggedIn) {
histogram_tester().ExpectTotalCount(
kWriteAccountKeyCharacteristicResultMetric, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -1740,7 +1740,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialNotLoggedIn) {
kWriteAccountKeyCharacteristicResultMetric, 0);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialLocked) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Initial_Locked) {
GetSessionControllerClient()->LockScreen();
histogram_tester().ExpectTotalCount(
kWriteAccountKeyCharacteristicResultMetric, 0);
@ -1767,7 +1767,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyInitialLocked) {
kWriteAccountKeyCharacteristicResultMetric, 0);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeySubsequentFlagEnabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Subsequent_FlagEnabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1811,7 +1811,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeySubsequentFlagEnabled) {
kWriteAccountKeyCharacteristicResultMetric, 0);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeySubsequentFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Subsequent_FlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -1855,7 +1855,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeySubsequentFlagDisabled) {
kWriteAccountKeyCharacteristicResultMetric, 0);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeySubsequentStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Subsequent_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -1898,7 +1898,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeySubsequentStrictFlagDisabled) {
kWriteAccountKeyCharacteristicResultMetric, 0);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyRetroactiveFlagEnabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Retroactive_FlagEnabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -1926,7 +1926,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyRetroactiveFlagEnabled) {
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyRetroactiveFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Retroactive_FlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -1953,7 +1953,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyRetroactiveFlagDisabled) {
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyRetroactiveStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccountKey_Retroactive_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -1979,7 +1979,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyRetroactiveStrictFlagDisabled) {
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyFailureInitialGattErrorFailed) {
TEST_F(FastPairPairerImplTest, WriteAccountKeyFailure_Initial_GattErrorFailed) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -2186,7 +2186,7 @@ TEST_F(FastPairPairerImplTest,
kWriteAccountKeyCharacteristicResultMetric, 1);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyFailureInitialNoCancelPairing) {
TEST_F(FastPairPairerImplTest, WriteAccountKeyFailure_Initial_NoCancelPairing) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -2212,7 +2212,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountKeyFailureInitialNoCancelPairing) {
EXPECT_CALL(*fake_bluetooth_device_ptr_, CancelPairing()).Times(0);
}
TEST_F(FastPairPairerImplTest, FastPairVersionOneDevicePaired) {
TEST_F(FastPairPairerImplTest, FastPairVersionOne_DevicePaired) {
Login(user_manager::UserType::kRegular);
CreateDevice(DeviceFastPairVersion::kV1);
@ -2243,7 +2243,7 @@ TEST_F(FastPairPairerImplTest,
EXPECT_EQ(device_->classic_address(), kBluetoothCanonicalizedAddress);
}
TEST_F(FastPairPairerImplTest, FastPairVersionOneDeviceUnpaired) {
TEST_F(FastPairPairerImplTest, FastPairVersionOne_DeviceUnpaired) {
Login(user_manager::UserType::kRegular);
CreateDevice(DeviceFastPairVersion::kV1);
@ -2258,7 +2258,7 @@ TEST_F(FastPairPairerImplTest, FastPairVersionOneDeviceUnpaired) {
DeviceUnpaired();
}
TEST_F(FastPairPairerImplTest, WriteAccountOptedOutFlagEnabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_OptedOut_FlagEnabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -2279,7 +2279,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountOptedOutFlagEnabled) {
RunWritePasskeyCallback(kResponseBytes);
}
TEST_F(FastPairPairerImplTest, WriteAccountOptedInFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_OptedIn_FlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -2309,7 +2309,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountOptedInFlagDisabled) {
1);
}
TEST_F(FastPairPairerImplTest, WriteAccountOptedInStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_OptedIn_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -2334,7 +2334,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountOptedInStrictFlagDisabled) {
1);
}
TEST_F(FastPairPairerImplTest, WriteAccountOptedOutFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_OptedOut_FlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -2360,7 +2360,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountOptedOutFlagDisabled) {
1);
}
TEST_F(FastPairPairerImplTest, WriteAccountOptedOutStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_OptedOut_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);
@ -2385,7 +2385,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountOptedOutStrictFlagDisabled) {
1);
}
TEST_F(FastPairPairerImplTest, WriteAccountStatusUnknownFlagEnabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_StatusUnknown_FlagEnabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2407,7 +2407,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountStatusUnknownFlagEnabled) {
RunWritePasskeyCallback(kResponseBytes);
}
TEST_F(FastPairPairerImplTest, WriteAccountStatusUnknownFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_StatusUnknown_FlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2433,7 +2433,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountStatusUnknownFlagDisabled) {
1);
}
TEST_F(FastPairPairerImplTest, WriteAccountStatusUnknownStrictFlagDisabled) {
TEST_F(FastPairPairerImplTest, WriteAccount_StatusUnknown_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2475,7 +2475,7 @@ TEST_F(FastPairPairerImplTest, WriteAccountStatusUnknownStrictFlagDisabled) {
1);
}
TEST_F(FastPairPairerImplTest, UpdateOptInStatusInitialPairing) {
TEST_F(FastPairPairerImplTest, UpdateOptInStatus_InitialPairing) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2528,7 +2528,7 @@ TEST_F(FastPairPairerImplTest, UpdateOptInStatusInitialPairing) {
/*success=*/false, 0);
}
TEST_F(FastPairPairerImplTest, UpdateOptInStatusRetroactivePairing) {
TEST_F(FastPairPairerImplTest, UpdateOptInStatus_RetroactivePairing) {
Login(user_manager::UserType::kRegular);
// Start opted out
@ -2572,7 +2572,7 @@ TEST_F(FastPairPairerImplTest, UpdateOptInStatusRetroactivePairing) {
/*success=*/false, 0);
}
TEST_F(FastPairPairerImplTest, UpdateOptInStatusSubsequentPairing) {
TEST_F(FastPairPairerImplTest, UpdateOptInStatus_SubsequentPairing) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2625,7 +2625,7 @@ TEST_F(FastPairPairerImplTest, UpdateOptInStatusSubsequentPairing) {
// In this test's scenario, |adapter_| knows of |device_|, so the
// FastPairPairerImpl object in |fake_fast_pair_handshake_| will attempt and
// fail to pair with it directly using FastPairPairerImpl::Pair.
TEST_F(FastPairPairerImplTest, CreateBondTimeoutAdapterHasDeviceAddress) {
TEST_F(FastPairPairerImplTest, CreateBondTimeout_AdapterHasDeviceAddress) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -2656,7 +2656,7 @@ TEST_F(FastPairPairerImplTest,
// PairByDevice refers to the fact that we aren't pairing by address, unlike
// most other tests in this file.
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectTimeoutInitial) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_ConnectTimeout_Initial) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -2672,7 +2672,7 @@ TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectTimeoutInitial) {
// PairByDevice refers to the fact that we aren't pairing by address, unlike
// most other tests in this file.
TEST_F(FastPairPairerImplTest, PairByDeviceSuccessConnectTimeoutSubsequent) {
TEST_F(FastPairPairerImplTest, PairByDeviceSuccess_ConnectTimeout_Subsequent) {
Login(user_manager::UserType::kRegular);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -2767,7 +2767,7 @@ TEST_F(FastPairPairerImplTest,
EXPECT_EQ(GetPairFailure(), PairFailure::kCreateBondTimeout);
}
TEST_F(FastPairPairerImplTest, WriteAccountKeyFailureRetroactive) {
TEST_F(FastPairPairerImplTest, WriteAccountKeyFailure_Retroactive) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_OUT);

@ -356,7 +356,7 @@ class PairerBrokerImplTest : public AshTestBase, public PairerBroker::Observer {
scoped_refptr<Device> device_;
};
TEST_F(PairerBrokerImplTest, PairV1DeviceInitial) {
TEST_F(PairerBrokerImplTest, PairV1Device_Initial) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kV1,
@ -374,7 +374,7 @@ TEST_F(PairerBrokerImplTest, PairV1DeviceInitial) {
EXPECT_EQ(account_key_write_count_, 0);
}
TEST_F(PairerBrokerImplTest, PairV2DeviceInitial) {
TEST_F(PairerBrokerImplTest, PairV2Device_Initial) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -397,7 +397,7 @@ TEST_F(PairerBrokerImplTest, PairV2DeviceInitial) {
EXPECT_EQ(account_key_write_count_, 1);
}
TEST_F(PairerBrokerImplTest, PairDeviceSubsequent) {
TEST_F(PairerBrokerImplTest, PairDevice_Subsequent) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairSubsequent);
@ -419,7 +419,7 @@ TEST_F(PairerBrokerImplTest, PairDeviceSubsequent) {
EXPECT_TRUE(device_pair_complete_);
}
TEST_F(PairerBrokerImplTest, BleAddressMatchesCreateHandshake) {
TEST_F(PairerBrokerImplTest, Ble_Address_Matches_Create_Handshake) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures({ash::features::kFastPairBleRotation}, {});
@ -432,7 +432,7 @@ TEST_F(PairerBrokerImplTest, BleAddressMatchesCreateHandshake) {
ExpectHandshakeExistsForDevice(device_);
}
TEST_F(PairerBrokerImplTest, BleAddressMismatchNoHandshake) {
TEST_F(PairerBrokerImplTest, Ble_Address_Mismatch_No_Handshake) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairBleRotation};
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -445,7 +445,7 @@ TEST_F(PairerBrokerImplTest, BleAddressMismatchNoHandshake) {
EXPECT_EQ(fake_fast_pair_handshake_, nullptr);
}
TEST_F(PairerBrokerImplTest, BleAddressMismatchSetCallback) {
TEST_F(PairerBrokerImplTest, Ble_Address_Mismatch_Set_Callback) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairBleRotation};
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -467,7 +467,7 @@ TEST_F(PairerBrokerImplTest, BleAddressMismatchSetCallback) {
ExpectBleRotatedForDevice(device_);
}
TEST_F(PairerBrokerImplTest, OnBleAddressRotationPairsSuccessfully) {
TEST_F(PairerBrokerImplTest, OnBleAddressRotation_Pairs_Successfully) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures({ash::features::kFastPairBleRotation}, {});
@ -496,7 +496,7 @@ TEST_F(PairerBrokerImplTest, OnBleAddressRotationPairsSuccessfully) {
EXPECT_FALSE(pairer_broker_->IsPairing());
}
TEST_F(PairerBrokerImplTest, PairDeviceRetroactive) {
TEST_F(PairerBrokerImplTest, PairDevice_Retroactive) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairRetroactive);
@ -516,7 +516,7 @@ TEST_F(PairerBrokerImplTest, PairDeviceRetroactive) {
EXPECT_FALSE(pairer_broker_->IsPairing());
}
TEST_F(PairerBrokerImplTest, AlreadyPairingDeviceInitial) {
TEST_F(PairerBrokerImplTest, AlreadyPairingDevice_Initial) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairInitial);
@ -536,7 +536,7 @@ TEST_F(PairerBrokerImplTest, AlreadyPairingDeviceInitial) {
1);
}
TEST_F(PairerBrokerImplTest, AlreadyPairingDeviceSubsequent) {
TEST_F(PairerBrokerImplTest, AlreadyPairingDevice_Subsequent) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairSubsequent);
@ -558,7 +558,7 @@ TEST_F(PairerBrokerImplTest, AlreadyPairingDeviceSubsequent) {
1);
}
TEST_F(PairerBrokerImplTest, AlreadyPairingDeviceRetroactive) {
TEST_F(PairerBrokerImplTest, AlreadyPairingDevice_Retroactive) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairRetroactive);
@ -608,7 +608,7 @@ TEST_F(PairerBrokerImplTest, PairAfterCancelPairing) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 1);
}
TEST_F(PairerBrokerImplTest, PairDeviceFailureMaxInitial) {
TEST_F(PairerBrokerImplTest, PairDeviceFailureMax_Initial) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairInitial);
@ -633,7 +633,7 @@ TEST_F(PairerBrokerImplTest, PairDeviceFailureMaxInitial) {
histogram_tester_.ExpectTotalCount(kProtocolPairingStepInitial, 1);
}
TEST_F(PairerBrokerImplTest, PairDeviceFailureMaxSubsequent) {
TEST_F(PairerBrokerImplTest, PairDeviceFailureMax_Subsequent) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairSubsequent);
@ -657,7 +657,7 @@ TEST_F(PairerBrokerImplTest, PairDeviceFailureMaxSubsequent) {
histogram_tester_.ExpectTotalCount(kProtocolPairingStepSubsequent, 1);
}
TEST_F(PairerBrokerImplTest, PairDeviceFailureMaxRetroactive) {
TEST_F(PairerBrokerImplTest, PairDeviceFailureMax_Retroactive) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairRetroactive);
@ -680,7 +680,7 @@ TEST_F(PairerBrokerImplTest, PairDeviceFailureMaxRetroactive) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
}
TEST_F(PairerBrokerImplTest, AccountKeyFailureInitial) {
TEST_F(PairerBrokerImplTest, AccountKeyFailure_Initial) {
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairInitial);
pairer_broker_->PairDevice(device_);
@ -696,7 +696,7 @@ TEST_F(PairerBrokerImplTest, AccountKeyFailureInitial) {
EXPECT_EQ(account_key_write_count_, 1);
}
TEST_F(PairerBrokerImplTest, AccountKeyFailureSubsequent) {
TEST_F(PairerBrokerImplTest, AccountKeyFailure_Subsequent) {
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairSubsequent);
pairer_broker_->PairDevice(device_);
@ -711,7 +711,7 @@ TEST_F(PairerBrokerImplTest, AccountKeyFailureSubsequent) {
EXPECT_EQ(account_key_write_count_, 1);
}
TEST_F(PairerBrokerImplTest, AccountKeyFailureRetroactive) {
TEST_F(PairerBrokerImplTest, AccountKeyFailure_Retroactive) {
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairRetroactive);
pairer_broker_->PairDevice(device_);
@ -745,7 +745,7 @@ TEST_F(PairerBrokerImplTest, StopPairing) {
EXPECT_FALSE(pairer_broker_->IsPairing());
}
TEST_F(PairerBrokerImplTest, ReuseHandshakeInitial) {
TEST_F(PairerBrokerImplTest, ReuseHandshake_Initial) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
@ -774,7 +774,7 @@ TEST_F(PairerBrokerImplTest, ReuseHandshakeInitial) {
1);
}
TEST_F(PairerBrokerImplTest, ReuseHandshakeSubsequent) {
TEST_F(PairerBrokerImplTest, ReuseHandshake_Subsequent) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairSubsequent);
@ -805,7 +805,7 @@ TEST_F(PairerBrokerImplTest, ReuseHandshakeSubsequent) {
1);
}
TEST_F(PairerBrokerImplTest, ReuseHandshakeRetroactive) {
TEST_F(PairerBrokerImplTest, ReuseHandshake_Retroactive) {
histogram_tester_.ExpectTotalCount(kFastPairRetryCountMetricName, 0);
CreateMockDevice(DeviceFastPairVersion::kHigherThanV1,
/*protocol=*/Protocol::kFastPairRetroactive);
@ -834,7 +834,7 @@ TEST_F(PairerBrokerImplTest, ReuseHandshakeRetroactive) {
1);
}
TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailedInitial) {
TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailed_Initial) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairHandshakeLongTermRefactor};
histogram_tester_.ExpectTotalCount(kHandshakeEffectiveSuccessRate, 0);
@ -853,7 +853,7 @@ TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailedInitial) {
1);
}
TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailedSubsequent) {
TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailed_Subsequent) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairHandshakeLongTermRefactor};
histogram_tester_.ExpectTotalCount(kHandshakeEffectiveSuccessRate, 0);
@ -872,7 +872,7 @@ TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailedSubsequent) {
1);
}
TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailedRetroactive) {
TEST_F(PairerBrokerImplTest, NoPairingIfHandshakeFailed_Retroactive) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairHandshakeLongTermRefactor};
histogram_tester_.ExpectTotalCount(kHandshakeEffectiveSuccessRate, 0);

@ -385,7 +385,7 @@ TEST_F(RetroactivePairingDetectorTest, NoMessageStream) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamNoBle) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_NoBle) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -406,7 +406,7 @@ TEST_F(RetroactivePairingDetectorTest, MessageStreamNoBle) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamNoModelId) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_NoModelId) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -428,7 +428,7 @@ TEST_F(RetroactivePairingDetectorTest, MessageStreamNoModelId) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamSocketError) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_SocketError) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -450,7 +450,7 @@ TEST_F(RetroactivePairingDetectorTest, MessageStreamSocketError) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamNoBytes) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_NoBytes) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -473,7 +473,7 @@ TEST_F(RetroactivePairingDetectorTest, MessageStreamNoBytes) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamBleModelIdLost) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_Ble_ModelId_Lost) {
Login(user_manager::UserType::kRegular);
fast_pair_repository_->SetOptInStatus(
nearby::fastpair::OptInStatus::STATUS_OPTED_IN);
@ -496,7 +496,7 @@ TEST_F(RetroactivePairingDetectorTest, MessageStreamBleModelIdLost) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamBleModelIdFlagEnabled) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_Ble_ModelId_FlagEnabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -530,7 +530,7 @@ TEST_F(RetroactivePairingDetectorTest, MessageStreamBleModelIdFlagEnabled) {
EXPECT_EQ(retroactive_device_->metadata_id(), kModelId);
}
TEST_F(RetroactivePairingDetectorTest, MessageStreamBleModelIdFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, MessageStream_Ble_ModelId_FlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1537,7 +1537,7 @@ TEST_F(RetroactivePairingDetectorTest,
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, DontNotifyOptedOutFlagEnabled) {
TEST_F(RetroactivePairingDetectorTest, DontNotify_OptedOut_FlagEnabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -1569,7 +1569,7 @@ TEST_F(RetroactivePairingDetectorTest, DontNotifyOptedOutFlagEnabled) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, NotifyOptedOutFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, Notify_OptedOut_FlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -1600,7 +1600,7 @@ TEST_F(RetroactivePairingDetectorTest, NotifyOptedOutFlagDisabled) {
EXPECT_TRUE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, NotifyOptedOutStrictFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, Notify_OptedOut_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -1631,7 +1631,7 @@ TEST_F(RetroactivePairingDetectorTest, NotifyOptedOutStrictFlagDisabled) {
EXPECT_TRUE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, NotifyOptedOutSavedFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, Notify_OptedOut_SavedFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -1662,7 +1662,7 @@ TEST_F(RetroactivePairingDetectorTest, NotifyOptedOutSavedFlagDisabled) {
EXPECT_TRUE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, NotifyOptedInFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, Notify_OptedIn_FlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -1690,7 +1690,7 @@ TEST_F(RetroactivePairingDetectorTest, NotifyOptedInFlagDisabled) {
EXPECT_TRUE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, NotifyOptedInStrictFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, Notify_OptedIn_StrictFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -1720,7 +1720,7 @@ TEST_F(RetroactivePairingDetectorTest, NotifyOptedInStrictFlagDisabled) {
EXPECT_TRUE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, NotifyOptedInSavedFlagDisabled) {
TEST_F(RetroactivePairingDetectorTest, Notify_OptedIn_SavedFlagDisabled) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -2147,7 +2147,7 @@ TEST_F(RetroactivePairingDetectorTest, NoCrashWhenFootprintsResponseIsSlow) {
fast_pair_repository_->TriggerIsDeviceSavedToAccountCallback();
}
TEST_F(RetroactivePairingDetectorTest, FastPairHIDSuccess) {
TEST_F(RetroactivePairingDetectorTest, FastPairHID_Success) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2175,7 +2175,7 @@ TEST_F(RetroactivePairingDetectorTest, FastPairHIDSuccess) {
EXPECT_EQ(retroactive_device_->metadata_id(), kModelId);
}
TEST_F(RetroactivePairingDetectorTest, FastPairHIDGattConnectionOpenSuccess) {
TEST_F(RetroactivePairingDetectorTest, FastPairHID_GattConnectionOpen_Success) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2203,7 +2203,7 @@ TEST_F(RetroactivePairingDetectorTest, FastPairHIDGattConnectionOpenSuccess) {
EXPECT_EQ(retroactive_device_->metadata_id(), kModelId);
}
TEST_F(RetroactivePairingDetectorTest, FastPairHIDGattConnectionFailure) {
TEST_F(RetroactivePairingDetectorTest, FastPairHID_GattConnectionFailure) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
@ -2229,7 +2229,7 @@ TEST_F(RetroactivePairingDetectorTest, FastPairHIDGattConnectionFailure) {
EXPECT_FALSE(retroactive_pair_found_);
}
TEST_F(RetroactivePairingDetectorTest, FastPairHIDReadModelIdFailure) {
TEST_F(RetroactivePairingDetectorTest, FastPairHID_ReadModelIdFailure) {
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(

@ -140,7 +140,7 @@ TEST_F(SavedDeviceRegistryTest, MissingPrefService) {
saved_device_registry_->IsAccountKeySavedToRegistry(kAccountKey2));
}
TEST_F(SavedDeviceRegistryTest, DeleteAccountKeyMacAddress) {
TEST_F(SavedDeviceRegistryTest, DeleteAccountKey_MacAddress) {
bool success1 = saved_device_registry_->SaveAccountAssociation(
kFirstSavedMacAddress, kAccountKey1);
bool success2 = saved_device_registry_->SaveAccountAssociation(
@ -178,7 +178,7 @@ TEST_F(SavedDeviceRegistryTest, DeleteAccountKeyMacAddress) {
EXPECT_FALSE(saved_device_registry_->DeleteAccountKey(kFirstSavedMacAddress));
}
TEST_F(SavedDeviceRegistryTest, DeleteAccountKeyAccountKey) {
TEST_F(SavedDeviceRegistryTest, DeleteAccountKey_AccountKey) {
bool success1 = saved_device_registry_->SaveAccountAssociation(
kFirstSavedMacAddress, kAccountKey1);
bool success2 = saved_device_registry_->SaveAccountAssociation(

@ -286,7 +286,7 @@ TEST_F(FastPairRepositoryImplTest, GetDeviceMetadata) {
EXPECT_EQ(1, metadata_http_fetcher_->num_gets());
}
TEST_F(FastPairRepositoryImplTest, GetDeviceMetadataFailedRetryable) {
TEST_F(FastPairRepositoryImplTest, GetDeviceMetadata_Failed_Retryable) {
base::RunLoop run_loop;
metadata_http_fetcher_->set_network_error(true);
fast_pair_repository_->GetDeviceMetadata(
@ -297,7 +297,7 @@ TEST_F(FastPairRepositoryImplTest, GetDeviceMetadataFailedRetryable) {
run_loop.Run();
}
TEST_F(FastPairRepositoryImplTest, GetDeviceMetadataFailedNotRetryable) {
TEST_F(FastPairRepositoryImplTest, GetDeviceMetadata_Failed_NotRetryable) {
base::RunLoop run_loop;
fast_pair_repository_->GetDeviceMetadata(
kInvalidModelId,
@ -308,7 +308,7 @@ TEST_F(FastPairRepositoryImplTest, GetDeviceMetadataFailedNotRetryable) {
EXPECT_EQ(1, metadata_http_fetcher_->num_gets());
}
TEST_F(FastPairRepositoryImplTest, CheckAccountKeysNoMatch) {
TEST_F(FastPairRepositoryImplTest, CheckAccountKeys_NoMatch) {
AccountKeyFilter filter(kFilterBytes1, {salt});
auto run_loop = base::RunLoop();
@ -319,7 +319,7 @@ TEST_F(FastPairRepositoryImplTest, CheckAccountKeysNoMatch) {
run_loop.Run();
}
TEST_F(FastPairRepositoryImplTest, CheckAccountKeysMatch) {
TEST_F(FastPairRepositoryImplTest, CheckAccountKeys_Match) {
AccountKeyFilter filter(kFilterBytes1, {salt});
nearby::fastpair::GetObservedDeviceResponse device;
DeviceMetadata metadata(device, gfx::Image());
@ -338,7 +338,7 @@ TEST_F(FastPairRepositoryImplTest, CheckAccountKeysMatch) {
run_loop.Run();
}
TEST_F(FastPairRepositoryImplTest, CheckAccountKeysMatchNoName) {
TEST_F(FastPairRepositoryImplTest, CheckAccountKeys_Match_No_Name) {
AccountKeyFilter filter(kFilterBytes1, {salt});
nearby::fastpair::GetObservedDeviceResponse device;
DeviceMetadata metadata(device, gfx::Image());
@ -360,7 +360,7 @@ TEST_F(FastPairRepositoryImplTest, CheckAccountKeysMatchNoName) {
run_loop.Run();
}
TEST_F(FastPairRepositoryImplTest, CheckAccountKeysSkipForgetPattern) {
TEST_F(FastPairRepositoryImplTest, CheckAccountKeys_SkipForgetPattern) {
AccountKeyFilter filter(kFilterBytes1, {salt});
nearby::fastpair::GetObservedDeviceResponse details;
DeviceMetadata metadata(details, gfx::Image());
@ -744,7 +744,7 @@ TEST_F(FastPairRepositoryImplTest,
saved_device_registry_->IsAccountKeySavedToRegistry(kAccountKey1));
}
TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceValid) {
TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDevice_Valid) {
AccountKeyFilter filter(kFilterBytes1, {salt});
nearby::fastpair::GetObservedDeviceResponse response;
DeviceMetadata metadata(response, gfx::Image());
@ -775,7 +775,7 @@ TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceValid) {
ASSERT_EQ(0u, pending_write_store_->GetPendingDeletes().size());
}
TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceInvalid) {
TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDevice_Invalid) {
base::MockCallback<base::OnceCallback<void(bool)>> callback;
EXPECT_CALL(callback, Run(testing::Eq(false))).Times(1);
fast_pair_repository_->DeleteAssociatedDevice(
@ -784,7 +784,7 @@ TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceInvalid) {
ASSERT_EQ(0u, pending_write_store_->GetPendingDeletes().size());
}
TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceByAccountKeyValid) {
TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceByAccountKey_Valid) {
AccountKeyFilter filter(kFilterBytes1, {salt});
nearby::fastpair::GetObservedDeviceResponse response;
DeviceMetadata metadata(response, gfx::Image());
@ -814,7 +814,7 @@ TEST_F(FastPairRepositoryImplTest, DeleteAssociatedDeviceByAccountKeyValid) {
ASSERT_EQ(0u, pending_write_store_->GetPendingDeletes().size());
}
TEST_F(FastPairRepositoryImplTest, RetriesForgetDeviceAfterNetworkAvailable) {
TEST_F(FastPairRepositoryImplTest, RetriesForgetDevice_AfterNetworkAvailable) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestBLEAddress,
Protocol::kFastPairInitial);
device->set_classic_address(kTestClassicAddress1);
@ -887,13 +887,13 @@ TEST_F(FastPairRepositoryImplTest, RetriesForgetDeviceAfterNetworkAvailable) {
// TODO(crbug.com/40264951): Re-enable this test
#if defined(MEMORY_SANITIZER)
#define MAYBE_RetriesForgetDeviceAlreadyDeleted \
DISABLED_RetriesForgetDeviceAlreadyDeleted
#define MAYBE_RetriesForgetDevice_AlreadyDeleted \
DISABLED_RetriesForgetDevice_AlreadyDeleted
#else
#define MAYBE_RetriesForgetDeviceAlreadyDeleted \
#define MAYBE_RetriesForgetDevice_AlreadyDeleted \
RetriesForgetDevice_AlreadyDeleted
#endif
TEST_F(FastPairRepositoryImplTest, MAYBE_RetriesForgetDeviceAlreadyDeleted) {
TEST_F(FastPairRepositoryImplTest, MAYBE_RetriesForgetDevice_AlreadyDeleted) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestBLEAddress,
Protocol::kFastPairInitial);
device->set_classic_address(kTestClassicAddress1);
@ -949,7 +949,7 @@ TEST_F(FastPairRepositoryImplTest, MAYBE_RetriesForgetDeviceAlreadyDeleted) {
ASSERT_EQ(0u, pending_write_store_->GetPendingDeletes().size());
}
TEST_F(FastPairRepositoryImplTest, RetriesForgetDeviceMultipleDevices) {
TEST_F(FastPairRepositoryImplTest, RetriesForgetDevice_MultipleDevices) {
auto device1 = base::MakeRefCounted<Device>(kValidModelId, kTestBLEAddress,
Protocol::kFastPairInitial);
device1->set_classic_address(kTestClassicAddress1);
@ -1172,11 +1172,11 @@ TEST_F(FastPairRepositoryImplTest, EvictDeviceImages) {
// TODO(crbug.com/40264951): Re-enable this test
#if defined(MEMORY_SANITIZER)
#define MAYBE_UpdateOptInStatusOptedIn DISABLED_UpdateOptInStatusOptedIn
#define MAYBE_UpdateOptInStatus_OptedIn DISABLED_UpdateOptInStatus_OptedIn
#else
#define MAYBE_UpdateOptInStatusOptedIn UpdateOptInStatusOptedIn
#define MAYBE_UpdateOptInStatus_OptedIn UpdateOptInStatus_OptedIn
#endif
TEST_F(FastPairRepositoryImplTest, MAYBE_UpdateOptInStatusOptedIn) {
TEST_F(FastPairRepositoryImplTest, MAYBE_UpdateOptInStatus_OptedIn) {
base::MockCallback<base::OnceCallback<void(bool)>> callback1;
EXPECT_CALL(callback1, Run(true)).Times(1);
fast_pair_repository_->UpdateOptInStatus(
@ -1191,7 +1191,7 @@ TEST_F(FastPairRepositoryImplTest, MAYBE_UpdateOptInStatusOptedIn) {
fast_pair_repository_->CheckOptInStatus(callback2.Get());
}
TEST_F(FastPairRepositoryImplTest, UpdateOptInStatusOptedOut) {
TEST_F(FastPairRepositoryImplTest, UpdateOptInStatus_OptedOut) {
base::MockCallback<base::OnceCallback<void(bool)>> callback1;
EXPECT_CALL(callback1, Run(true)).Times(1);
fast_pair_repository_->UpdateOptInStatus(
@ -1208,12 +1208,12 @@ TEST_F(FastPairRepositoryImplTest, UpdateOptInStatusOptedOut) {
// TODO(crbug.com/40264951): Re-enable this test
#if defined(MEMORY_SANITIZER)
#define MAYBE_UpdateOptInStatusStatusUnknown \
DISABLED_UpdateOptInStatusStatusUnknown
#define MAYBE_UpdateOptInStatus_StatusUnknown \
DISABLED_UpdateOptInStatus_StatusUnknown
#else
#define MAYBE_UpdateOptInStatusStatusUnknown UpdateOptInStatusStatusUnknown
#define MAYBE_UpdateOptInStatus_StatusUnknown UpdateOptInStatus_StatusUnknown
#endif
TEST_F(FastPairRepositoryImplTest, MAYBE_UpdateOptInStatusStatusUnknown) {
TEST_F(FastPairRepositoryImplTest, MAYBE_UpdateOptInStatus_StatusUnknown) {
base::MockCallback<base::OnceCallback<void(bool)>> callback1;
EXPECT_CALL(callback1, Run(true)).Times(1);
fast_pair_repository_->UpdateOptInStatus(
@ -1228,7 +1228,7 @@ TEST_F(FastPairRepositoryImplTest, MAYBE_UpdateOptInStatusStatusUnknown) {
fast_pair_repository_->CheckOptInStatus(callback2.Get());
}
TEST_F(FastPairRepositoryImplTest, UpdateOptInStatusNoFootprintsResponse) {
TEST_F(FastPairRepositoryImplTest, UpdateOptInStatus_NoFootprintsResponse) {
footprints_fetcher_->SetGetUserDevicesResponse(std::nullopt);
base::MockCallback<base::OnceCallback<void(nearby::fastpair::OptInStatus)>>
callback;
@ -1263,7 +1263,7 @@ TEST_F(FastPairRepositoryImplTest,
fast_pair_repository_->CheckOptInStatus(callback2.Get());
}
TEST_F(FastPairRepositoryImplTest, GetSavedDevicesOptedIn) {
TEST_F(FastPairRepositoryImplTest, GetSavedDevices_OptedIn) {
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
/*success=*/true, 0);
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
@ -1298,7 +1298,7 @@ TEST_F(FastPairRepositoryImplTest, GetSavedDevicesOptedIn) {
/*success=*/false, 0);
}
TEST_F(FastPairRepositoryImplTest, GetSavedDevicesOptedOut) {
TEST_F(FastPairRepositoryImplTest, GetSavedDevices_OptedOut) {
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
/*success=*/true, 0);
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
@ -1319,7 +1319,7 @@ TEST_F(FastPairRepositoryImplTest, GetSavedDevicesOptedOut) {
/*success=*/false, 0);
}
TEST_F(FastPairRepositoryImplTest, GetSavedDevicesOptStatusUnknown) {
TEST_F(FastPairRepositoryImplTest, GetSavedDevices_OptStatusUnknown) {
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
/*success=*/true, 0);
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
@ -1340,7 +1340,7 @@ TEST_F(FastPairRepositoryImplTest, GetSavedDevicesOptStatusUnknown) {
/*success=*/false, 0);
}
TEST_F(FastPairRepositoryImplTest, GetSavedDevicesMissingResponse) {
TEST_F(FastPairRepositoryImplTest, GetSavedDevices_MissingResponse) {
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
/*success=*/true, 0);
histogram_tester().ExpectBucketCount(kSavedDeviceGetDevicesResultMetricName,
@ -1418,7 +1418,7 @@ TEST_F(FastPairRepositoryImplTest,
EXPECT_FALSE(fast_pair_repository_->IsAccountKeyPairedLocally(kAccountKey2));
}
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountMatch) {
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccount_Match) {
nearby::fastpair::FastPairInfo info;
auto* device = info.mutable_device();
device->set_account_key(
@ -1491,7 +1491,7 @@ TEST_F(FastPairRepositoryImplTest,
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountNoMatch) {
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccount_NoMatch) {
nearby::fastpair::FastPairInfo info;
auto* device = info.mutable_device();
device->set_account_key(
@ -1512,7 +1512,7 @@ TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountNoMatch) {
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountMissingResponse) {
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccount_MissingResponse) {
footprints_fetcher_->SetGetUserDevicesResponse(std::nullopt);
base::MockCallback<base::OnceCallback<void(bool)>> callback;
@ -1523,7 +1523,7 @@ TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountMissingResponse) {
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountMissingAccountKey) {
TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccount_MissingAccountKey) {
nearby::fastpair::FastPairInfo info;
auto* device = info.mutable_device();
device->set_sha256_account_key_public_address(
@ -1544,12 +1544,13 @@ TEST_F(FastPairRepositoryImplTest, IsDeviceSavedToAccountMissingAccountKey) {
// TODO(crbug.com/40264951): Re-enable this test
#if defined(MEMORY_SANITIZER)
#define MAYBE_IsDeviceSavedToAccountMissingSha \
DISABLED_IsDeviceSavedToAccountMissingSha
#define MAYBE_IsDeviceSavedToAccount_MissingSha \
DISABLED_IsDeviceSavedToAccount_MissingSha
#else
#define MAYBE_IsDeviceSavedToAccountMissingSha IsDeviceSavedToAccountMissingSha
#define MAYBE_IsDeviceSavedToAccount_MissingSha \
IsDeviceSavedToAccount_MissingSha
#endif
TEST_F(FastPairRepositoryImplTest, MAYBE_IsDeviceSavedToAccountMissingSha) {
TEST_F(FastPairRepositoryImplTest, MAYBE_IsDeviceSavedToAccount_MissingSha) {
nearby::fastpair::FastPairInfo info;
auto* device = info.mutable_device();
device->set_account_key(

@ -74,7 +74,7 @@ class OAuthHttpFetcherTest : public testing::Test {
signin::IdentityTestEnvironment identity_test_env_;
};
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestSuccess) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_Success) {
GURL url(kTestUrl);
std::string body(kBody);
auto head = network::mojom::URLResponseHead::New();
@ -94,7 +94,7 @@ TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestSuccess) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestFailure) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_Failure) {
url_loader_factory_.AddResponse(kTestUrl, "",
net::HTTP_INTERNAL_SERVER_ERROR);
@ -110,7 +110,7 @@ TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestFailure) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestMultipleCalls) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_MultipleCalls) {
url_loader_factory_.AddResponse(kTestUrl, "",
net::HTTP_INTERNAL_SERVER_ERROR);
@ -128,7 +128,7 @@ TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestMultipleCalls) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestNoToken) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_NoToken) {
identity_test_env_.SetAutomaticIssueOfAccessTokens(false);
url_loader_factory_.AddResponse(kTestUrl, "",
net::HTTP_INTERNAL_SERVER_ERROR);
@ -142,7 +142,7 @@ TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestNoToken) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestNoUrlFactory) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_NoUrlFactory) {
ON_CALL(*browser_delegate_, GetURLLoaderFactory())
.WillByDefault(testing::Return(nullptr));
url_loader_factory_.AddResponse(kTestUrl, "",
@ -157,7 +157,7 @@ TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestNoUrlFactory) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestNoIdentityManager) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_NoIdentityManager) {
ON_CALL(*browser_delegate_, GetIdentityManager())
.WillByDefault(testing::Return(nullptr));
@ -167,14 +167,14 @@ TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestNoIdentityManager) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequestMultipleRaceCondition) {
TEST_F(OAuthHttpFetcherTest, ExecuteGetRequest_MultipleRaceCondition) {
http_fetcher_->ExecuteGetRequest(GURL(kTestUrl), base::DoNothing());
EXPECT_DEATH(
http_fetcher_->ExecuteGetRequest(GURL(kTestUrl), base::DoNothing()), "");
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecutePostRequestSuccess) {
TEST_F(OAuthHttpFetcherTest, ExecutePostRequest_Success) {
GURL url(kTestUrl);
std::string body(kBody);
auto head = network::mojom::URLResponseHead::New();
@ -194,7 +194,7 @@ TEST_F(OAuthHttpFetcherTest, ExecutePostRequestSuccess) {
task_environment_.RunUntilIdle();
}
TEST_F(OAuthHttpFetcherTest, ExecuteDeleteRequestSuccess) {
TEST_F(OAuthHttpFetcherTest, ExecuteDeleteRequest_Success) {
GURL url(kTestUrl);
std::string body(kBody);
auto head = network::mojom::URLResponseHead::New();

@ -44,7 +44,7 @@ class UnauthenticatedHttpFetcherTest : public testing::Test {
network::TestURLLoaderFactory url_loader_factory_;
};
TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequestSuccess) {
TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequest_Success) {
GURL url(kTestUrl);
std::string body(kBody);
auto head = network::mojom::URLResponseHead::New();
@ -64,7 +64,7 @@ TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequestSuccess) {
task_environment_.RunUntilIdle();
}
TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequestFailure) {
TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequest_Failure) {
url_loader_factory_.AddResponse(kTestUrl, "",
net::HTTP_INTERNAL_SERVER_ERROR);
@ -80,7 +80,7 @@ TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequestFailure) {
task_environment_.RunUntilIdle();
}
TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequestFailureNoUrlLoader) {
TEST_F(UnauthenticatedHttpFetcherTest, ExecuteGetRequest_Failure_NoUrlLoader) {
ON_CALL(*browser_delegate_, GetURLLoaderFactory())
.WillByDefault(testing::Return(nullptr));

@ -181,7 +181,7 @@ TEST_F(FastPairDiscoverableScannerImplTest,
scanner_->NotifyDeviceFound(device);
}
TEST_F(FastPairDiscoverableScannerImplTest, UtilityProcessStoppedDeviceLost) {
TEST_F(FastPairDiscoverableScannerImplTest, UtilityProcessStopped_DeviceLost) {
auto device = std::make_unique<device::MockBluetoothDevice>(
adapter_.get(), 0, "test_name", kAddress, /*paired=*/false,
/*connected=*/false);
@ -198,7 +198,7 @@ TEST_F(FastPairDiscoverableScannerImplTest, UtilityProcessStoppedDeviceLost) {
scanner_->NotifyDeviceFound(device_ptr);
}
TEST_F(FastPairDiscoverableScannerImplTest, ValidModelIdFactoryCreate) {
TEST_F(FastPairDiscoverableScannerImplTest, ValidModelId_FactoryCreate) {
discoverable_scanner_.reset();
std::unique_ptr<FastPairDiscoverableScanner>
discoverable_scanner_from_factory =
@ -521,7 +521,7 @@ TEST_F(FastPairDiscoverableScannerImplTest, NearbyShareModelId) {
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairDiscoverableScannerImplTest, InvokesLostCallbackAfterFoundV1) {
TEST_F(FastPairDiscoverableScannerImplTest, InvokesLostCallbackAfterFound_v1) {
device::BluetoothDevice* device = GetDevice(kValidModelId);
EXPECT_CALL(found_device_callback_, Run).Times(1);
@ -582,7 +582,7 @@ TEST_F(FastPairDiscoverableScannerImplTest,
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairDiscoverableScannerImplTest, InvokesLostCallbackAfterFoundV2) {
TEST_F(FastPairDiscoverableScannerImplTest, InvokesLostCallbackAfterFound_v2) {
nearby::fastpair::Device metadata;
metadata.set_trigger_distance(2);
nearby::fastpair::Status* status = metadata.mutable_status();

@ -273,7 +273,7 @@ class ScannerBrokerImplTest : public AshTestBase,
std::unique_ptr<ScannerBroker> scanner_broker_;
};
TEST_F(ScannerBrokerImplTest, RegularUserDiscoverableFound) {
TEST_F(ScannerBrokerImplTest, RegularUser_DiscoverableFound) {
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -291,7 +291,7 @@ TEST_F(ScannerBrokerImplTest, RegularUserDiscoverableFound) {
EXPECT_TRUE(device_found_);
}
TEST_F(ScannerBrokerImplTest, ChildUserDiscoverableFound) {
TEST_F(ScannerBrokerImplTest, ChildUser_DiscoverableFound) {
Login(user_manager::UserType::kChild);
base::RunLoop().RunUntilIdle();
@ -309,7 +309,7 @@ TEST_F(ScannerBrokerImplTest, ChildUserDiscoverableFound) {
EXPECT_TRUE(device_found_);
}
TEST_F(ScannerBrokerImplTest, RegularUserNotDiscoverableFound) {
TEST_F(ScannerBrokerImplTest, RegularUser_NotDiscoverableFound) {
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -327,7 +327,7 @@ TEST_F(ScannerBrokerImplTest, RegularUserNotDiscoverableFound) {
EXPECT_TRUE(device_found_);
}
TEST_F(ScannerBrokerImplTest, GuestUserDiscoverableFound) {
TEST_F(ScannerBrokerImplTest, GuestUser_DiscoverableFound) {
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -344,7 +344,7 @@ TEST_F(ScannerBrokerImplTest, GuestUserDiscoverableFound) {
EXPECT_TRUE(device_found_);
}
TEST_F(ScannerBrokerImplTest, GuestUserNotDiscoverableNotCreated) {
TEST_F(ScannerBrokerImplTest, GuestUser_NotDiscoverableNotCreated) {
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -357,7 +357,7 @@ TEST_F(ScannerBrokerImplTest, GuestUserNotDiscoverableNotCreated) {
EXPECT_TRUE(discoverable_scanner_factory_->create_instance());
}
TEST_F(ScannerBrokerImplTest, GuestUserRegularUserLogsIn) {
TEST_F(ScannerBrokerImplTest, GuestUser_RegularUserLogsIn) {
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -375,7 +375,7 @@ TEST_F(ScannerBrokerImplTest, GuestUserRegularUserLogsIn) {
EXPECT_TRUE(not_discoverable_scanner_factory_->create_instance());
}
TEST_F(ScannerBrokerImplTest, RegularUserGuestUserLogsIn) {
TEST_F(ScannerBrokerImplTest, RegularUser_GuestUserLogsIn) {
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -393,7 +393,7 @@ TEST_F(ScannerBrokerImplTest, RegularUserGuestUserLogsIn) {
EXPECT_TRUE(not_discoverable_scanner_factory_->create_instance());
}
TEST_F(ScannerBrokerImplTest, PublicUserNotDiscoverableNotCreated) {
TEST_F(ScannerBrokerImplTest, PublicUser_NotDiscoverableNotCreated) {
Login(user_manager::UserType::kPublicAccount);
base::RunLoop().RunUntilIdle();
@ -406,7 +406,7 @@ TEST_F(ScannerBrokerImplTest, PublicUserNotDiscoverableNotCreated) {
EXPECT_TRUE(discoverable_scanner_factory_->create_instance());
}
TEST_F(ScannerBrokerImplTest, KioskNotDiscoverableNotCreated) {
TEST_F(ScannerBrokerImplTest, Kiosk_NotDiscoverableNotCreated) {
Login(user_manager::UserType::kKioskApp);
base::RunLoop().RunUntilIdle();
@ -419,7 +419,7 @@ TEST_F(ScannerBrokerImplTest, KioskNotDiscoverableNotCreated) {
EXPECT_TRUE(discoverable_scanner_factory_->create_instance());
}
TEST_F(ScannerBrokerImplTest, RegularUserDiscoverableLost) {
TEST_F(ScannerBrokerImplTest, RegularUser_DiscoverableLost) {
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -437,7 +437,7 @@ TEST_F(ScannerBrokerImplTest, RegularUserDiscoverableLost) {
EXPECT_TRUE(device_lost_);
}
TEST_F(ScannerBrokerImplTest, RegularUserNotDiscoverableLost) {
TEST_F(ScannerBrokerImplTest, RegularUser_NotDiscoverableLost) {
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -455,7 +455,7 @@ TEST_F(ScannerBrokerImplTest, RegularUserNotDiscoverableLost) {
EXPECT_TRUE(device_lost_);
}
TEST_F(ScannerBrokerImplTest, GuestUserDiscoverableLost) {
TEST_F(ScannerBrokerImplTest, GuestUser_DiscoverableLost) {
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -472,7 +472,7 @@ TEST_F(ScannerBrokerImplTest, GuestUserDiscoverableLost) {
EXPECT_TRUE(device_lost_);
}
TEST_F(ScannerBrokerImplTest, StopScanningRegular) {
TEST_F(ScannerBrokerImplTest, StopScanning_Regular) {
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();

@ -181,7 +181,7 @@ TEST_F(FastPairNotificationControllerTest,
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairNotificationControllerTest, ShowErrorNotificationRemovedByOS) {
TEST_F(FastPairNotificationControllerTest, ShowErrorNotification_RemovedByOS) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairErrorNotificationId));
@ -758,7 +758,7 @@ TEST_F(FastPairNotificationControllerTest,
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairNotificationControllerTest, ShowAssociateAccountRemovedByUser) {
TEST_F(FastPairNotificationControllerTest, ShowAssociateAccount_RemovedByUser) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairAssociateAccountNotificationId));
@ -786,7 +786,7 @@ TEST_F(FastPairNotificationControllerTest, ShowAssociateAccountRemovedByUser) {
base::RunLoop().RunUntilIdle();
}
TEST_F(FastPairNotificationControllerTest, ShowAssociateAccountRemovedByOS) {
TEST_F(FastPairNotificationControllerTest, ShowAssociateAccount_RemovedByOS) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairAssociateAccountNotificationId));

@ -408,7 +408,7 @@ TEST_F(FastPairPresenterImplTest,
kFastPairDiscoveryUserNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryChild) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_Child) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoveryUserNotificationId));
@ -731,7 +731,7 @@ TEST_F(FastPairPresenterImplTest,
kFastPairDiscoveryGuestNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserConnectClicked) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_User_ConnectClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -756,7 +756,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserConnectClicked) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kPairToDevice);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserLearnMoreClicked) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_User_LearnMoreClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -781,7 +781,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserLearnMoreClicked) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kLearnMore);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserDismissedByUser) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_User_DismissedByUser) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -832,7 +832,7 @@ TEST_F(FastPairPresenterImplTest,
EXPECT_EQ(discovery_action_, DiscoveryAction::kDismissedByTimeout);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserDismissedByOS) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_User_DismissedByOS) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::test::ScopedFeatureList feature_list;
@ -857,7 +857,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryUserDismissedByOS) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kDismissedByOs);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuest) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_Guest) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoveryGuestNotificationId));
@ -876,7 +876,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuest) {
kFastPairDiscoveryGuestNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryKioskApp) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_KioskApp) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoveryGuestNotificationId));
@ -901,7 +901,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryKioskApp) {
kFastPairDiscoveryGuestNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuestConnectClicked) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_Guest_ConnectClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -921,7 +921,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuestConnectClicked) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kPairToDevice);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuestLearnMoreClicked) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_Guest_LearnMoreClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -941,7 +941,7 @@ TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuestLearnMoreClicked) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kLearnMore);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuestDismissedByUser) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_Guest_DismissedByUser) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -982,7 +982,7 @@ TEST_F(FastPairPresenterImplTest,
EXPECT_EQ(discovery_action_, DiscoveryAction::kDismissedByTimeout);
}
TEST_F(FastPairPresenterImplTest, ShowInitialDiscoveryGuestDismissedByOS) {
TEST_F(FastPairPresenterImplTest, ShowInitialDiscovery_Guest_DismissedByOS) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -1017,7 +1017,7 @@ TEST_F(FastPairPresenterImplTest, ShowPairing) {
kFastPairPairingNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowPairingNoDeviceMetadata) {
TEST_F(FastPairPresenterImplTest, ShowPairing_NoDeviceMetadata) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairPairingNotificationId));
@ -1052,7 +1052,7 @@ TEST_F(FastPairPresenterImplTest, ShowPairingFailed) {
kFastPairErrorNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowPairingFailedNoDeviceMetadata) {
TEST_F(FastPairPresenterImplTest, ShowPairingFailed_NoDeviceMetadata) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairErrorNotificationId));
@ -1072,7 +1072,7 @@ TEST_F(FastPairPresenterImplTest, ShowPairingFailedNoDeviceMetadata) {
kFastPairErrorNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowPairingFailedSettingsClicked) {
TEST_F(FastPairPresenterImplTest, ShowPairingFailed_SettingsClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -1092,7 +1092,7 @@ TEST_F(FastPairPresenterImplTest, ShowPairingFailedSettingsClicked) {
EXPECT_EQ(pairing_failed_action_, PairingFailedAction::kNavigateToSettings);
}
TEST_F(FastPairPresenterImplTest, ShowPairingFailedDismissedByOS) {
TEST_F(FastPairPresenterImplTest, ShowPairingFailed_DismissedByOS) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kGuest);
base::RunLoop().RunUntilIdle();
@ -1162,7 +1162,7 @@ TEST_F(FastPairPresenterImplTest, ShowCompanionAppEnabled) {
kFastPairApplicationInstalledNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowCompanionAppSetupClicked) {
TEST_F(FastPairPresenterImplTest, ShowCompanionApp_SetupClicked) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -1189,7 +1189,7 @@ TEST_F(FastPairPresenterImplTest, ShowCompanionAppSetupClicked) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kLaunchApp);
}
TEST_F(FastPairPresenterImplTest, ShowCompanionAppNoDeviceMetadata) {
TEST_F(FastPairPresenterImplTest, ShowCompanionApp_NoDeviceMetadata) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -1216,7 +1216,7 @@ TEST_F(FastPairPresenterImplTest, ShowCompanionAppNoDeviceMetadata) {
kFastPairApplicationInstalledNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowCompanionAppDismissedByUser) {
TEST_F(FastPairPresenterImplTest, ShowCompanionApp_DismissedByUser) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -1243,7 +1243,7 @@ TEST_F(FastPairPresenterImplTest, ShowCompanionAppDismissedByUser) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kDismissedByUser);
}
TEST_F(FastPairPresenterImplTest, ShowCompanionAppDismissedByOS) {
TEST_F(FastPairPresenterImplTest, ShowCompanionApp_DismissedByOS) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -1293,7 +1293,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccount) {
1);
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountSaveClicked) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_SaveClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -1314,7 +1314,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountSaveClicked) {
AssociateAccountAction::kAssociateAccount);
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountNoDeviceMetadata) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_NoDeviceMetadata) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairAssociateAccountNotificationId));
@ -1334,7 +1334,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountNoDeviceMetadata) {
kFastPairAssociateAccountNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountNoIdentityManager) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_NoIdentityManager) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairAssociateAccountNotificationId));
@ -1354,7 +1354,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountNoIdentityManager) {
kFastPairAssociateAccountNotificationId));
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountLearnMoreClicked) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_LearnMoreClicked) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -1374,7 +1374,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountLearnMoreClicked) {
EXPECT_EQ(associate_account_action_, AssociateAccountAction::kLearnMore);
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountDismissedByUser) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_DismissedByUser) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -1395,7 +1395,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountDismissedByUser) {
AssociateAccountAction::kDismissedByUser);
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountDismissedByTimeout) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_DismissedByTimeout) {
SetIdentityManager(identity_manager_);
test_message_center_.CloseNotificationsWhenRemoved();
Login(user_manager::UserType::kRegular);
@ -1416,7 +1416,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountDismissedByTimeout) {
associate_account_action_);
}
TEST_F(FastPairPresenterImplTest, ShowAssociateAccountDismissedByOS) {
TEST_F(FastPairPresenterImplTest, ShowAssociateAccount_DismissedByOS) {
SetIdentityManager(identity_manager_);
Login(user_manager::UserType::kRegular);
base::RunLoop().RunUntilIdle();
@ -1436,7 +1436,7 @@ TEST_F(FastPairPresenterImplTest, ShowAssociateAccountDismissedByOS) {
EXPECT_EQ(AssociateAccountAction::kDismissedByOs, associate_account_action_);
}
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryConnect) {
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscovery_Connect) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoverySubsequentNotificationId));
@ -1460,7 +1460,7 @@ TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryConnect) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kPairToDevice);
}
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryLearnMore) {
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscovery_LearnMore) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoverySubsequentNotificationId));
@ -1484,7 +1484,7 @@ TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryLearnMore) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kLearnMore);
}
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryDismissedByUser) {
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscovery_DismissedByUser) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoverySubsequentNotificationId));
@ -1509,7 +1509,7 @@ TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryDismissedByUser) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kDismissedByUser);
}
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscoveryDismissedByOS) {
TEST_F(FastPairPresenterImplTest, ShowSubsequentDiscovery_DismissedByOS) {
EXPECT_FALSE(test_message_center_.FindVisibleNotificationById(
kFastPairDiscoverySubsequentNotificationId));

@ -168,7 +168,7 @@ class UIBrokerImplTest : public AshTestBase, public UIBroker::Observer {
std::unique_ptr<UIBroker> ui_broker_;
};
TEST_F(UIBrokerImplTest, ShowDiscoveryInitial) {
TEST_F(UIBrokerImplTest, ShowDiscovery_Initial) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairInitial);
ui_broker_->ShowDiscovery(device);
@ -177,7 +177,7 @@ TEST_F(UIBrokerImplTest, ShowDiscoveryInitial) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kPairToDevice);
}
TEST_F(UIBrokerImplTest, ShowDiscoverySubsequent) {
TEST_F(UIBrokerImplTest, ShowDiscovery_Subsequent) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairSubsequent);
ui_broker_->ShowDiscovery(device);
@ -186,7 +186,7 @@ TEST_F(UIBrokerImplTest, ShowDiscoverySubsequent) {
EXPECT_EQ(discovery_action_, DiscoveryAction::kPairToDevice);
}
TEST_F(UIBrokerImplTest, ShowPairingInitial) {
TEST_F(UIBrokerImplTest, ShowPairing_Initial) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairInitial);
ui_broker_->ShowPairing(device);
@ -195,7 +195,7 @@ TEST_F(UIBrokerImplTest, ShowPairingInitial) {
EXPECT_TRUE(presenter_factory_->fake_fast_pair_presenter()->show_pairing());
}
TEST_F(UIBrokerImplTest, ShowPairingSubsequent) {
TEST_F(UIBrokerImplTest, ShowPairing_Subsequent) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairSubsequent);
ui_broker_->ShowPairing(device);
@ -204,7 +204,7 @@ TEST_F(UIBrokerImplTest, ShowPairingSubsequent) {
EXPECT_TRUE(presenter_factory_->fake_fast_pair_presenter()->show_pairing());
}
TEST_F(UIBrokerImplTest, ShowPairingFailedInitial) {
TEST_F(UIBrokerImplTest, ShowPairingFailed_Initial) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairInitial);
ui_broker_->ShowPairingFailed(device);
@ -213,7 +213,7 @@ TEST_F(UIBrokerImplTest, ShowPairingFailedInitial) {
EXPECT_EQ(pairing_failed_action_, PairingFailedAction::kNavigateToSettings);
}
TEST_F(UIBrokerImplTest, ShowPairingFailedSubsequent) {
TEST_F(UIBrokerImplTest, ShowPairingFailed_Subsequent) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairSubsequent);
ui_broker_->ShowPairingFailed(device);
@ -222,7 +222,7 @@ TEST_F(UIBrokerImplTest, ShowPairingFailedSubsequent) {
EXPECT_EQ(pairing_failed_action_, PairingFailedAction::kNavigateToSettings);
}
TEST_F(UIBrokerImplTest, ShowPairingFailedRetroactive) {
TEST_F(UIBrokerImplTest, ShowPairingFailed_Retroactive) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairRetroactive);
ui_broker_->ShowPairingFailed(device);
@ -232,7 +232,7 @@ TEST_F(UIBrokerImplTest, ShowPairingFailedRetroactive) {
presenter_factory_->fake_fast_pair_presenter()->show_pairing_failed());
}
TEST_F(UIBrokerImplTest, ShowAssociateAccountInitial) {
TEST_F(UIBrokerImplTest, ShowAssociateAccount_Initial) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairInitial);
ui_broker_->ShowAssociateAccount(device);
@ -241,7 +241,7 @@ TEST_F(UIBrokerImplTest, ShowAssociateAccountInitial) {
EXPECT_EQ(associate_account_action_, AssociateAccountAction::kLearnMore);
}
TEST_F(UIBrokerImplTest, ShowAssociateAccountRetroactive) {
TEST_F(UIBrokerImplTest, ShowAssociateAccount_Retroactive) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairRetroactive);
ui_broker_->ShowAssociateAccount(device);
@ -250,7 +250,7 @@ TEST_F(UIBrokerImplTest, ShowAssociateAccountRetroactive) {
EXPECT_EQ(associate_account_action_, AssociateAccountAction::kLearnMore);
}
TEST_F(UIBrokerImplTest, ShowInstallCompanionAppInitialDisabled) {
TEST_F(UIBrokerImplTest, ShowInstallCompanionApp_Initial_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -262,7 +262,7 @@ TEST_F(UIBrokerImplTest, ShowInstallCompanionAppInitialDisabled) {
"");
}
TEST_F(UIBrokerImplTest, ShowInstallCompanionAppInitialEnabled) {
TEST_F(UIBrokerImplTest, ShowInstallCompanionApp_Initial_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -274,7 +274,7 @@ TEST_F(UIBrokerImplTest, ShowInstallCompanionAppInitialEnabled) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kDownloadAndLaunchApp);
}
TEST_F(UIBrokerImplTest, ShowInstallCompanionAppSubsequentDisabled) {
TEST_F(UIBrokerImplTest, ShowInstallCompanionApp_Subsequent_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -286,7 +286,7 @@ TEST_F(UIBrokerImplTest, ShowInstallCompanionAppSubsequentDisabled) {
"");
}
TEST_F(UIBrokerImplTest, ShowInstallCompanionAppSubsequentEnabled) {
TEST_F(UIBrokerImplTest, ShowInstallCompanionApp_Subsequent_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -298,7 +298,7 @@ TEST_F(UIBrokerImplTest, ShowInstallCompanionAppSubsequentEnabled) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kDownloadAndLaunchApp);
}
TEST_F(UIBrokerImplTest, ShowInstallCompanionAppRetroactiveDisabled) {
TEST_F(UIBrokerImplTest, ShowInstallCompanionApp_Retroactive_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -310,7 +310,7 @@ TEST_F(UIBrokerImplTest, ShowInstallCompanionAppRetroactiveDisabled) {
"");
}
TEST_F(UIBrokerImplTest, ShowInstallCompanionAppRetroactiveEnabled) {
TEST_F(UIBrokerImplTest, ShowInstallCompanionApp_Retroactive_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -322,7 +322,7 @@ TEST_F(UIBrokerImplTest, ShowInstallCompanionAppRetroactiveEnabled) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kDownloadAndLaunchApp);
}
TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppInitialDisabled) {
TEST_F(UIBrokerImplTest, ShowLaunchCompanionApp_Initial_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -334,7 +334,7 @@ TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppInitialDisabled) {
"");
}
TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppInitialEnabled) {
TEST_F(UIBrokerImplTest, ShowLaunchCompanionApp_Initial_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -346,7 +346,7 @@ TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppInitialEnabled) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kLaunchApp);
}
TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppSubsequentDisabled) {
TEST_F(UIBrokerImplTest, ShowLaunchCompanionApp_Subsequent_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -358,7 +358,7 @@ TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppSubsequentDisabled) {
"");
}
TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppSubsequentEnabled) {
TEST_F(UIBrokerImplTest, ShowLaunchCompanionApp_Subsequent_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -370,7 +370,7 @@ TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppSubsequentEnabled) {
EXPECT_EQ(companion_app_action_, CompanionAppAction::kLaunchApp);
}
TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppRetroactiveDisabled) {
TEST_F(UIBrokerImplTest, ShowLaunchCompanionApp_Retroactive_Disabled) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
/*enabled_features=*/{},
@ -382,7 +382,7 @@ TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppRetroactiveDisabled) {
"");
}
TEST_F(UIBrokerImplTest, ShowLaunchCompanionAppRetroactiveEnabled) {
TEST_F(UIBrokerImplTest, ShowLaunchCompanionApp_Retroactive_Enabled) {
base::test::ScopedFeatureList feature_list{
ash::features::kFastPairPwaCompanion};
@ -401,7 +401,7 @@ TEST_F(UIBrokerImplTest, ShowPasskey) {
EXPECT_TRUE(presenter_factory_->fake_fast_pair_presenter()->show_passkey());
}
TEST_F(UIBrokerImplTest, RemoveNotificationsInitial) {
TEST_F(UIBrokerImplTest, RemoveNotifications_Initial) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairInitial);
ui_broker_->RemoveNotifications();
@ -410,7 +410,7 @@ TEST_F(UIBrokerImplTest, RemoveNotificationsInitial) {
EXPECT_TRUE(presenter_factory_->fake_fast_pair_presenter()->removed());
}
TEST_F(UIBrokerImplTest, RemoveNotificationsSubsequent) {
TEST_F(UIBrokerImplTest, RemoveNotifications_Subsequent) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairSubsequent);
ui_broker_->RemoveNotifications();
@ -419,7 +419,7 @@ TEST_F(UIBrokerImplTest, RemoveNotificationsSubsequent) {
EXPECT_TRUE(presenter_factory_->fake_fast_pair_presenter()->removed());
}
TEST_F(UIBrokerImplTest, RemoveNotificationsRetroactive) {
TEST_F(UIBrokerImplTest, RemoveNotifications_Retroactive) {
auto device = base::MakeRefCounted<Device>(kValidModelId, kTestDeviceAddress,
Protocol::kFastPairRetroactive);
ui_broker_->RemoveNotifications();

@ -135,7 +135,7 @@ class RootWindowControllerTest : public AshTestBase {
}
};
TEST_F(RootWindowControllerTest, MoveWindowsBasic) {
TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
// Windows origin should be doubled when moved to the 1st display.
UpdateDisplay("600x500,300x250");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
@ -252,7 +252,7 @@ TEST_F(RootWindowControllerTest, MoveWindowsBasic) {
unparented_control->GetNativeView()->parent()->GetId());
}
TEST_F(RootWindowControllerTest, MoveWindowsModal) {
TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
UpdateDisplay("500x400,500x600");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
@ -282,7 +282,7 @@ TEST_F(RootWindowControllerTest, MoveWindowsModal) {
}
// Make sure lock related windows moves.
TEST_F(RootWindowControllerTest, MoveWindowsLockWindowsInUnified) {
TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) {
display_manager()->SetUnifiedDesktopEnabled(true);
UpdateDisplay("500x400");
@ -344,7 +344,7 @@ TEST_F(RootWindowControllerTest, MoveWindowsLockWindowsInUnified) {
}
// Tests that the moved windows maintain MRU ordering.
TEST_F(RootWindowControllerTest, MoveWindowsMaintainMRUordering) {
TEST_F(RootWindowControllerTest, MoveWindows_MaintainMRUordering) {
UpdateDisplay("600x500,300x250");
display::Screen* screen = display::Screen::GetScreen();

@ -327,7 +327,7 @@ TEST_F(RoundedDisplayGutterTest, BoundsOfGuttersWithThreeCorners) {
}
}
TEST_F(RoundedDisplayGutterTest, CorrectTexturesGutterHasSingleCorner) {
TEST_F(RoundedDisplayGutterTest, CorrectTextures_GutterHasSingleCorner) {
{
RoundedCorner upper_right_corner(RoundedCornerPosition::kUpperRight,
kCornerRadiusInPixels_16,
@ -498,7 +498,7 @@ TEST_F(RoundedDisplayGutterTest,
0);
}
TEST_F(RoundedDisplayGutterTest, GutterHasFourCornersAllCornersPainted) {
TEST_F(RoundedDisplayGutterTest, GutterHasFourCorners_AllCornersPainted) {
RoundedCorner upper_left_corner(RoundedCornerPosition::kUpperLeft,
kCornerRadiusInPixels_16, gfx::Point(0, 0));
RoundedCorner upper_right_corner(RoundedCornerPosition::kUpperRight,
@ -532,7 +532,7 @@ TEST_F(RoundedDisplayGutterTest, GutterHasFourCornersAllCornersPainted) {
gutter.get()));
}
TEST_F(RoundedDisplayGutterTest, GutterHasTwoAdjacentCornersOneCornerPainted) {
TEST_F(RoundedDisplayGutterTest, GutterHasTwoAdjacentCorners_OneCornerPainted) {
RoundedCorner upper_left_corner(RoundedCornerPosition::kUpperLeft, 0,
gfx::Point(0, 0));
RoundedCorner lower_right_corner(RoundedCornerPosition::kLowerRight,

@ -847,7 +847,7 @@ TEST_F(ShelfLayoutManagerTest, StatusAreaMoveWithSwipeOnAutoHiddenShelf) {
}
// Checks that the shelf keeps hidden during the Kiosk mode.
TEST_F(ShelfLayoutManagerTest, HiddenShelfInKioskModeFullScreen) {
TEST_F(ShelfLayoutManagerTest, HiddenShelfInKioskMode_FullScreen) {
SetUpKioskSession();
// Create a window and make it full screen; the shelf should be hidden.
@ -868,7 +868,7 @@ TEST_F(ShelfLayoutManagerTest, HiddenShelfInKioskModeFullScreen) {
// Checks that the shelf keeps hidden during the Kiosk mode. (Some windows might
// not be fullscreen, e.g., the a11y setting window.)
TEST_F(ShelfLayoutManagerTest, HiddenShelfInKioskModeDefault) {
TEST_F(ShelfLayoutManagerTest, HiddenShelfInKioskMode_Default) {
SetUpKioskSession();
// Create a default window; the shelf should be hidden.

@ -224,7 +224,7 @@ TEST_F(ColorPaletteControllerTest, SetStaticColor) {
EXPECT_EQ(static_color, static_cast<SkColor>(local_static_color.value()));
}
TEST_F(ColorPaletteControllerTest, UpdateColorSchemeNotifiesObserver) {
TEST_F(ColorPaletteControllerTest, UpdateColorScheme_NotifiesObserver) {
color_palette_controller()->SetColorScheme(
style::mojom::ColorScheme::kVibrant, kAccountId, base::DoNothing());
SimulateUserLogin(kAccountId);
@ -248,7 +248,7 @@ TEST_F(ColorPaletteControllerTest, UpdateColorSchemeNotifiesObserver) {
task_environment()->RunUntilIdle();
}
TEST_F(ColorPaletteControllerTest, UpdateStaticColorNotifiesObserver) {
TEST_F(ColorPaletteControllerTest, UpdateStaticColor_NotifiesObserver) {
color_palette_controller()->SetColorScheme(
style::mojom::ColorScheme::kVibrant, kAccountId, base::DoNothing());
SimulateUserLogin(kAccountId);
@ -272,7 +272,7 @@ TEST_F(ColorPaletteControllerTest, UpdateStaticColorNotifiesObserver) {
task_environment()->RunUntilIdle();
}
TEST_F(ColorPaletteControllerTest, UpdateUseKMeansNotifiesObserver) {
TEST_F(ColorPaletteControllerTest, UpdateUseKMeans_NotifiesObserver) {
color_palette_controller()->SetColorScheme(
style::mojom::ColorScheme::kTonalSpot, kAccountId, base::DoNothing());
SetUseKMeansPref(true);
@ -317,7 +317,7 @@ TEST_F(ColorPaletteControllerTest, ColorModeTriggersObserver) {
dark_light_controller()->SetDarkModeEnabledForTest(true);
}
TEST_F(ColorPaletteControllerTest, NativeThemeDarkModeChanged) {
TEST_F(ColorPaletteControllerTest, NativeTheme_DarkModeChanged) {
// Set to a known state.
dark_light_controller()->SetDarkModeEnabledForTest(true);
WallpaperControllerTestApi wallpaper(wallpaper_controller());
@ -383,7 +383,7 @@ TEST_F(ColorPaletteControllerTest, GenerateSampleScheme) {
SkColorSetRGB(0xc8, 0xbf, 0xff))));
}
TEST_F(ColorPaletteControllerTest, GenerateSampleSchemeAllValuesTeal) {
TEST_F(ColorPaletteControllerTest, GenerateSampleScheme_AllValues_Teal) {
SkColor seed = SkColorSetRGB(0x00, 0xbf, 0x7f); // Hue 160* Saturation 100%
// Vibrance 75%
@ -412,7 +412,7 @@ TEST_F(ColorPaletteControllerTest, GenerateSampleSchemeAllValuesTeal) {
.tertiary = SkColorSetRGB(0x70, 0xb7, 0xb7)}));
}
TEST_F(ColorPaletteControllerTest, NewUserUsesCelebiColor) {
TEST_F(ColorPaletteControllerTest, NewUser_UsesCelebiColor) {
SimulateNewUserFirstLogin("thecreek@song.com");
base::RunLoop().RunUntilIdle();
@ -435,7 +435,7 @@ TEST_F(ColorPaletteControllerTest,
color_palette_controller()->GetCurrentSeed()->seed_color);
}
TEST_F(ColorPaletteControllerTest, ExistingUserUsesKMeansColor) {
TEST_F(ColorPaletteControllerTest, ExistingUser_UsesKMeansColor) {
const bool dark_mode = true;
dark_light_controller()->SetDarkModeEnabledForTest(dark_mode);
@ -491,7 +491,7 @@ TEST_F(ColorPaletteControllerTest,
ASSERT_EQ(kCelebiColor, color);
}
TEST_F(ColorPaletteControllerTest, GuestLoginUsesCelebiColor) {
TEST_F(ColorPaletteControllerTest, GuestLogin_UsesCelebiColor) {
const SkColor celebi_color = SK_ColorBLUE;
SimulateGuestLogin();
@ -502,7 +502,7 @@ TEST_F(ColorPaletteControllerTest, GuestLoginUsesCelebiColor) {
color_palette_controller()->GetCurrentSeed()->seed_color);
}
TEST_F(ColorPaletteControllerTest, WallpaperChangedTurnsOffKMeans) {
TEST_F(ColorPaletteControllerTest, WallpaperChanged_TurnsOffKMeans) {
const SkColor celebi_color = SK_ColorBLUE;
SetUseKMeansPref(true);
SimulateUserLogin(kAccountId);
@ -524,7 +524,7 @@ TEST_F(ColorPaletteControllerTest, WallpaperChangedTurnsOffKMeans) {
color_palette_controller()->GetCurrentSeed()->seed_color);
}
TEST_F(ColorPaletteControllerTest, UseKMeansColorOnlyTonalSpotUsesKMeans) {
TEST_F(ColorPaletteControllerTest, UseKMeansColor_OnlyTonalSpotUsesKMeans) {
const bool dark_mode = true;
dark_light_controller()->SetDarkModeEnabledForTest(dark_mode);
SimulateUserLogin(kAccountId);
@ -553,7 +553,7 @@ TEST_F(ColorPaletteControllerTest, UseKMeansColorOnlyTonalSpotUsesKMeans) {
color_palette_controller()->GetCurrentSeed()->seed_color);
}
TEST_F(ColorPaletteControllerTest, WithoutUseKMeansColorAllSchemesUseCelebi) {
TEST_F(ColorPaletteControllerTest, WithoutUseKMeansColor_AllSchemesUseCelebi) {
const SkColor celebi_color = SK_ColorBLUE;
SimulateUserLogin(kAccountId);
SetUseKMeansPref(false);
@ -581,7 +581,7 @@ TEST_F(ColorPaletteControllerTest, WithoutUseKMeansColorAllSchemesUseCelebi) {
color_palette_controller()->GetCurrentSeed()->seed_color);
}
TEST_F(ColorPaletteControllerTest, GetSampleColorSchemesWithKMeans) {
TEST_F(ColorPaletteControllerTest, GetSampleColorSchemes_WithKMeans) {
SimulateUserLogin(kAccountId);
SetUseKMeansPref(true);
@ -663,7 +663,7 @@ class ColorPaletteControllerLocalPrefTest : public ColorPaletteControllerTest {
}
};
TEST_F(ColorPaletteControllerLocalPrefTest, OnUserLoginUpdatesLocalPrefs) {
TEST_F(ColorPaletteControllerLocalPrefTest, OnUserLogin_UpdatesLocalPrefs) {
SetUpLocalPrefs();
const auto wallpaper_color = SK_ColorGRAY;
UpdateWallpaperColor(wallpaper_color);
@ -767,7 +767,7 @@ TEST_F(ColorPaletteControllerLocalPrefTest,
// Verifies that when the TimeOfDayWallpaper wallpaper is active, the default
// color scheme is Neutral instead of TonalSpot in local_state.
TEST_F(ColorPaletteControllerLocalPrefTest, NoLocalAccountTimeOfDayScheme) {
TEST_F(ColorPaletteControllerLocalPrefTest, NoLocalAccount_TimeOfDayScheme) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures(
personalization_app::GetTimeOfDayEnabledFeatures(), {});

@ -128,7 +128,7 @@ class SelectToSpeakMenuBubbleControllerTest : public AshTestBase {
base::HistogramTester histogram_tester_;
};
TEST_F(SelectToSpeakMenuBubbleControllerTest, ShowSelectToSpeakPanelPaused) {
TEST_F(SelectToSpeakMenuBubbleControllerTest, ShowSelectToSpeakPanel_paused) {
ShowSelectToSpeakPanel(/*is_paused=*/true);
EXPECT_TRUE(GetMenuView());

@ -204,7 +204,7 @@ class BrightnessControllerChromeosTest : public AshTestBase {
}
};
TEST_F(BrightnessControllerChromeosTest, PrefsOnLoginScreenMultipleUsers) {
TEST_F(BrightnessControllerChromeosTest, Prefs_OnLoginScreen_MultipleUsers) {
// Set initial brightness.
power_manager_client()->set_screen_brightness_percent(kInitialBrightness);
@ -464,7 +464,7 @@ TEST_F(BrightnessControllerChromeosTest,
}
}
TEST_F(BrightnessControllerChromeosTest, HistogramTestLoginSecondary) {
TEST_F(BrightnessControllerChromeosTest, HistogramTest_LoginSecondary) {
// Metric count should start at 0.
histogram_tester_->ExpectTotalCount(
"ChromeOS.Display.TimeUntilFirstBrightnessChange.OnLoginScreen."
@ -509,7 +509,7 @@ TEST_F(BrightnessControllerChromeosTest, HistogramTestLoginSecondary) {
1);
}
TEST_F(BrightnessControllerChromeosTest, HistogramTestPowerSourceCharger) {
TEST_F(BrightnessControllerChromeosTest, HistogramTest_PowerSourceCharger) {
// Metric count should start at 0.
histogram_tester_->ExpectTotalCount(
"ChromeOS.Display.TimeUntilFirstBrightnessChange.OnLoginScreen."
@ -949,7 +949,7 @@ TEST_F(BrightnessControllerChromeosTest,
base::Seconds(seconds_to_wait), 1);
}
TEST_F(BrightnessControllerChromeosTest, SetBrightnessPercentCause) {
TEST_F(BrightnessControllerChromeosTest, SetBrightnessPercent_Cause) {
GetSessionControllerClient()->SetSessionState(
session_manager::SessionState::ACTIVE);
SetChargerPower();
@ -974,7 +974,7 @@ TEST_F(BrightnessControllerChromeosTest, SetBrightnessPercentCause) {
SetBacklightBrightnessRequest_Cause_USER_REQUEST_FROM_SETTINGS_APP);
}
TEST_F(BrightnessControllerChromeosTest, SetAmbientLightSensorEnabledCause) {
TEST_F(BrightnessControllerChromeosTest, SetAmbientLightSensorEnabled_Cause) {
GetSessionControllerClient()->SetSessionState(
session_manager::SessionState::ACTIVE);
SetChargerPower();
@ -1740,7 +1740,7 @@ TEST_F(BrightnessControllerChromeosTest,
"ChromeOS.Display.Startup.AmbientLightSensorEnabled", 1);
}
TEST_F(BrightnessControllerChromeosTest, RestoreBrightnessSettingsNoSensor) {
TEST_F(BrightnessControllerChromeosTest, RestoreBrightnessSettings_NoSensor) {
// Test case: Disable ALS via brightness key and restore brightness settings.
// When the device has no sensor. ALS should not be re-enabled after login.
scoped_feature_list_.InitAndEnableFeature(
@ -1792,7 +1792,7 @@ TEST_F(BrightnessControllerChromeosTest, RestoreBrightnessSettingsNoSensor) {
ExpectBrightnessPercent(30.0, "brighntess is restored");
}
TEST_F(BrightnessControllerChromeosTest, RestoreBrightnessSettingsHasSensor) {
TEST_F(BrightnessControllerChromeosTest, RestoreBrightnessSettings_HasSensor) {
// Test case: Disable ALS via brightness key and restore brightness settings.
// When the device has a sensor. ALS should be re-enabled after login.
scoped_feature_list_.InitAndEnableFeature(

@ -268,7 +268,7 @@ TEST_F(EcheTrayTest, OnStatusAreaAnchoredBubbleVisibilityChanged) {
// OnStatusAreaAnchoredBubbleVisibilityChanged() is called on the current bubble
// and hence should be ignored.
TEST_F(EcheTrayTest, OnStatusAreaAnchoredBubbleVisibilityChangedSameWidget) {
TEST_F(EcheTrayTest, OnStatusAreaAnchoredBubbleVisibilityChanged_SameWidget) {
eche_tray()->LoadBubble(
GURL("http://google.com"), CreateTestImage(), u"app 1", u"your phone",
eche_app::mojom::ConnectionStatus::kConnectionStatusDisconnected,
@ -286,7 +286,7 @@ TEST_F(EcheTrayTest, OnStatusAreaAnchoredBubbleVisibilityChangedSameWidget) {
// OnStatusAreaAnchoredBubbleVisibilityChanged() is called on some other bubble
// but the visible parameter is false, hence we should not do anything.
TEST_F(EcheTrayTest, OnStatusAreaAnchoredBubbleVisibilityChangedNonVisible) {
TEST_F(EcheTrayTest, OnStatusAreaAnchoredBubbleVisibilityChanged_NonVisible) {
eche_tray()->LoadBubble(
GURL("http://google.com"), CreateTestImage(), u"app 1", u"your phone",
eche_app::mojom::ConnectionStatus::kConnectionStatusDisconnected,
@ -422,7 +422,7 @@ TEST_F(EcheTrayTest, EcheTrayBackButtonClicked) {
EXPECT_EQ(2u, num_web_content_go_back_calls_);
}
TEST_F(EcheTrayTest, AcceleratorKeyHandledMinimize) {
TEST_F(EcheTrayTest, AcceleratorKeyHandled_Minimize) {
eche_tray()->LoadBubble(
GURL("http://google.com"), CreateTestImage(), u"app 1", u"your phone",
eche_app::mojom::ConnectionStatus::kConnectionStatusDisconnected,
@ -449,7 +449,7 @@ TEST_F(EcheTrayTest, AcceleratorKeyHandledMinimize) {
EXPECT_FALSE(is_web_content_unloaded_);
}
TEST_F(EcheTrayTest, AcceleratorKeyHandledCtrlW) {
TEST_F(EcheTrayTest, AcceleratorKeyHandled_Ctrl_W) {
ResetUnloadWebContent();
eche_tray()->SetGracefulCloseCallback(base::BindOnce(&UnloadWebContent));
eche_tray()->LoadBubble(
@ -468,7 +468,7 @@ TEST_F(EcheTrayTest, AcceleratorKeyHandledCtrlW) {
EXPECT_TRUE(is_web_content_unloaded_);
}
TEST_F(EcheTrayTest, AcceleratorKeyHandledBROWSERBACKKEY) {
TEST_F(EcheTrayTest, AcceleratorKeyHandled_BROWSER_BACK_KEY) {
ResetWebContentGoBack();
eche_tray()->SetGracefulGoBackCallback(
base::BindRepeating(&WebContentGoBack));
@ -483,7 +483,7 @@ TEST_F(EcheTrayTest, AcceleratorKeyHandledBROWSERBACKKEY) {
EXPECT_EQ(1u, num_web_content_go_back_calls_);
}
TEST_F(EcheTrayTest, AcceleratorKeyHandledEsc) {
TEST_F(EcheTrayTest, AcceleratorKeyHandled_Esc) {
ResetUnloadWebContent();
eche_tray()->SetGracefulCloseCallback(base::BindOnce(&UnloadWebContent));
eche_tray()->LoadBubble(

@ -133,14 +133,14 @@ FocusModeTask TestTask(std::string_view task_id) {
return task;
}
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskChangedEmptyList) {
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskChanged_EmptyList) {
FocusModeTask task = TestTask("task0");
model().SetSelectedTask(task);
EXPECT_THAT(observer().last_selected_task(), Optional(SameId("task0")));
EXPECT_THAT(observer().last_task_list(), Optional(SizeIs(1)));
}
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskChangedSelectById) {
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskChanged_SelectById) {
std::vector<FocusModeTask> test_tasks = {TestTask("task0"), TestTask("task1"),
TestTask("task2")};
model().SetTaskList(std::move(test_tasks));
@ -163,7 +163,7 @@ TEST_F(FocusModeTasksModelObserverTest,
EXPECT_THAT(observer().last_selected_task(), Eq(std::nullopt));
}
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefsPrefFirst) {
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefs_PrefFirst) {
model().SetSelectedTaskFromPrefs({
.list_id = kTaskListId,
.id = "from_prefs",
@ -186,7 +186,7 @@ TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefsPrefFirst) {
EXPECT_THAT(observer().last_task_list(), Optional(SizeIs(4)));
}
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefsListFirst) {
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefs_ListFirst) {
FocusModeTask pref_task = TestTask("from_prefs");
pref_task.title = "Correct title";
std::vector<FocusModeTask> test_tasks = {TestTask("task0"), TestTask("task1"),
@ -207,7 +207,7 @@ TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefsListFirst) {
Field(&FocusModeTask::title, "Correct title"))));
}
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefsTaskIsCompleted) {
TEST_F(FocusModeTasksModelObserverTest, SelectedTaskFromPrefs_TaskIsCompleted) {
// Desired task from prefs.
TaskId task_id = {.list_id = kTaskListId, .id = "from_prefs"};
@ -327,7 +327,7 @@ TEST_F(FocusModeTasksModelObserverTest, ClearTask) {
EXPECT_THAT(observer().last_selected_task(), Eq(std::nullopt));
}
TEST_F(FocusModeTasksModelObserverTest, RequestUpdateImmediateNotification) {
TEST_F(FocusModeTasksModelObserverTest, RequestUpdate_ImmediateNotification) {
model().SetTaskList(
{TestTask("task0"), TestTask("task1"), TestTask("task2")});
ASSERT_TRUE(model().SetSelectedTask({.list_id = kTaskListId, .id = "task1"}));
@ -359,7 +359,7 @@ TEST_F(FocusModeTasksModelObserverTest, CompleteTask) {
// Tests that we fetch the selected task data when `RequestUpdate()` is called
// and update the selected task title if it is updated.
TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTaskTaskTitleUpdated) {
TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTask_TaskTitleUpdated) {
// Setup.
FakeDelegate delegate;
model().SetDelegate(delegate.AsWeakPtr());
@ -395,7 +395,7 @@ TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTaskTaskTitleUpdated) {
// Tests that if a selected task was completed remotely, it is marked as
// completed and removed from the list for `RequestUpdate()`.
TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTaskTaskIsCompleted) {
TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTask_TaskIsCompleted) {
// Setup.
FakeDelegate delegate;
model().SetDelegate(delegate.AsWeakPtr());
@ -433,7 +433,7 @@ TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTaskTaskIsCompleted) {
// Tests that `FetchTasks()` is still called even if the selected task request
// fails.
TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTaskRequestFails) {
TEST_F(FocusModeTasksModelObserverTest, FetchSelectedTask_RequestFails) {
// Setup.
FakeDelegate delegate;
model().SetDelegate(delegate.AsWeakPtr());

@ -1098,7 +1098,7 @@ TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappingsFlagDisabled) {
settings_dict->contains(prefs::kKeyboardSettingSixPackKeyRemappings));
}
TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappingsDefault) {
TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappings_Default) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(features::kAltClickAndSixPackCustomization);
@ -1117,7 +1117,7 @@ TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappingsDefault) {
settings->six_pack_key_remappings->insert);
}
TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappingsGroup) {
TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappings_Group) {
{
base::test::ScopedFeatureList disable_feature_list;
disable_feature_list.InitAndDisableFeature(
@ -1137,7 +1137,7 @@ TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappingsGroup) {
settings->six_pack_key_remappings->page_up);
}
TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappingsRetrieveSettings) {
TEST_F(KeyboardPrefHandlerTest, SixPackKeyRemappings_RetrieveSettings) {
{
base::test::ScopedFeatureList disable_feature_list;
disable_feature_list.InitAndDisableFeature(

@ -826,7 +826,7 @@ TEST_F(MousePrefHandlerTest, DefaultNotPersistedUntilUpdated) {
CheckMouseSettingsAndDictAreEqual(kMouseSettingsDefault, *settings_dict);
}
TEST_F(MousePrefHandlerTest, NewMouseManagedEnterprisePolicyGetsDefaults) {
TEST_F(MousePrefHandlerTest, NewMouse_ManagedEnterprisePolicy_GetsDefaults) {
mojom::MousePolicies policies;
policies.swap_right_policy = mojom::InputDeviceSettingsPolicy::New(
mojom::PolicyStatus::kManaged, !kDefaultSwapRight);
@ -844,7 +844,7 @@ TEST_F(MousePrefHandlerTest, NewMouseManagedEnterprisePolicyGetsDefaults) {
EXPECT_FALSE(settings_dict->contains(prefs::kMouseSettingSwapRight));
}
TEST_F(MousePrefHandlerTest, LoginScreenManagedEnterprisePolicy) {
TEST_F(MousePrefHandlerTest, LoginScreen_ManagedEnterprisePolicy) {
mojom::MousePolicies policies;
policies.swap_right_policy = mojom::InputDeviceSettingsPolicy::New(
mojom::PolicyStatus::kManaged, !kDefaultSwapRight);

@ -937,7 +937,7 @@ TEST_F(KeyboardBrightnessControllerTest,
ExpectKeyboardAmbientLightSensorEnabled(true);
}
TEST_F(KeyboardBrightnessControllerTest, SetKeyboardBrightnessCause) {
TEST_F(KeyboardBrightnessControllerTest, SetKeyboardBrightness_Cause) {
// Keyboard brightness changes from Quick Settings should have cause
// "USER_REQUEST".
keyboard_brightness_control_delegate()->HandleSetKeyboardBrightness(
@ -1126,7 +1126,7 @@ TEST_F(KeyboardBrightnessControllerTest,
ExpectKeyboardBrightnessPercent(kInitialKeyboardBrightness);
}
TEST_F(KeyboardBrightnessControllerTest, RestoreBrightnessSettingsNoSensor) {
TEST_F(KeyboardBrightnessControllerTest, RestoreBrightnessSettings_NoSensor) {
// Test case: Disable ALS via brightness key and restore brightness settings.
// When the device has no sensor. ALS should not be re-enabled after login.
scoped_feature_list_.InitAndEnableFeature(
@ -1181,7 +1181,7 @@ TEST_F(KeyboardBrightnessControllerTest, RestoreBrightnessSettingsNoSensor) {
ExpectKeyboardBrightnessPercent(30.0);
}
TEST_F(KeyboardBrightnessControllerTest, RestoreBrightnessSettingsHasSensor) {
TEST_F(KeyboardBrightnessControllerTest, RestoreBrightnessSettings_HasSensor) {
// Test case: Disable ALS via brightness key and restore brightness settings.
// when the device has a sensor. ALS should be re-enabled after login.
scoped_feature_list_.InitAndEnableFeature(
@ -1309,7 +1309,7 @@ TEST_F(KeyboardBrightnessControllerTest,
1);
}
TEST_F(KeyboardBrightnessControllerTest, HistogramTestLoginSecondary) {
TEST_F(KeyboardBrightnessControllerTest, HistogramTest_LoginSecondary) {
// Metric count should start at 0.
histogram_tester_->ExpectTotalCount(
"ChromeOS.Keyboard.TimeUntilFirstBrightnessChange.OnLoginScreen."
@ -1354,7 +1354,7 @@ TEST_F(KeyboardBrightnessControllerTest, HistogramTestLoginSecondary) {
1);
}
TEST_F(KeyboardBrightnessControllerTest, HistogramTestPowerSourceCharger) {
TEST_F(KeyboardBrightnessControllerTest, HistogramTest_PowerSourceCharger) {
// Metric count should start at 0.
histogram_tester_->ExpectTotalCount(
"ChromeOS.Keyboard.TimeUntilFirstBrightnessChange.OnLoginScreen."

@ -89,7 +89,7 @@ class MahiNudgeControllerTest : public AshTestBase {
};
// Tests that the nudge can show when the user is not opted into Mahi.
TEST_F(MahiNudgeControllerTest, NudgeShowsWhenUserPrefNotEnabled) {
TEST_F(MahiNudgeControllerTest, NudgeShows_WhenUserPrefNotEnabled) {
test_magic_boost_state_.AsyncWriteHMREnabled(false);
EXPECT_FALSE(IsMahiNudgeShown());
@ -98,7 +98,7 @@ TEST_F(MahiNudgeControllerTest, NudgeShowsWhenUserPrefNotEnabled) {
}
// Tests that the nudge won't show when the user has opted into Mahi.
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowWhenUserPrefEnabled) {
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShow_WhenUserPrefEnabled) {
test_magic_boost_state_.AsyncWriteHMREnabled(true);
EXPECT_FALSE(IsMahiNudgeShown());
@ -107,7 +107,7 @@ TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowWhenUserPrefEnabled) {
}
// Tests that the nudge can show when the consent status is unset.
TEST_F(MahiNudgeControllerTest, NudgeShowsWhenConsentStatusIsUnset) {
TEST_F(MahiNudgeControllerTest, NudgeShows_WhenConsentStatusIsUnset) {
test_magic_boost_state_.AsyncWriteHMREnabled(false);
test_magic_boost_state_.AsyncWriteConsentStatus(
chromeos::HMRConsentStatus::kUnset);
@ -118,7 +118,7 @@ TEST_F(MahiNudgeControllerTest, NudgeShowsWhenConsentStatusIsUnset) {
}
// Tests that the nudge won't show when the consent status is set.
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowWhenConsentStatusSet) {
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShow_WhenConsentStatusSet) {
test_magic_boost_state_.AsyncWriteHMREnabled(false);
test_magic_boost_state_.AsyncWriteConsentStatus(
@ -145,7 +145,7 @@ TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowWhenConsentStatusSet) {
// Tests that the nudge won't show if the time between shown threshold hasn't
// passed since it was last shown.
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowIfRecentlyShown) {
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShow_IfRecentlyShown) {
test_magic_boost_state_.AsyncWriteHMREnabled(false);
SetTestTime(base::Time::Now());
@ -179,7 +179,7 @@ TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowIfRecentlyShown) {
}
// Tests that the nudge won't show if it has been shown its max number of times.
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShowIfMaxTimesShown) {
TEST_F(MahiNudgeControllerTest, NudgeDoesNotShow_IfMaxTimesShown) {
test_magic_boost_state_.AsyncWriteHMREnabled(false);
SetTestTime(base::Time::Now());

@ -847,7 +847,7 @@ TEST_F(MahiPanelViewTest, ScrollViewContentsDynamicSize) {
// Tests that the question textfield accepts user input and creates a text
// bubble with the provided text by pressing the send button or enter.
TEST_F(MahiPanelViewTest, QuestionTextfieldCreateQuestion) {
TEST_F(MahiPanelViewTest, QuestionTextfield_CreateQuestion) {
auto* const question_answer_view =
panel_view()->GetViewByID(mahi_constants::ViewId::kQuestionAnswerView);
auto* const send_button =
@ -920,7 +920,7 @@ TEST_F(MahiPanelViewTest, QuestionTextfieldCreateQuestion) {
// Tests that the question textfield does not send requests to the manager while
// it is waiting to load an answer.
TEST_F(MahiPanelViewTest, QuestionTextfieldInputDisabledWhileLoadingAnswer) {
TEST_F(MahiPanelViewTest, QuestionTextfield_InputDisabledWhileLoadingAnswer) {
// Send button is initially enabled.
const auto* const send_button =
panel_view()->GetViewByID(mahi_constants::ViewId::kAskQuestionSendButton);
@ -973,7 +973,7 @@ TEST_F(MahiPanelViewTest, QuestionTextfieldInputDisabledWhileLoadingAnswer) {
}
// Tests that the question textfield does not process empty or blank inputs.
TEST_F(MahiPanelViewTest, QuestionTextfieldEmptyInput) {
TEST_F(MahiPanelViewTest, QuestionTextfield_EmptyInput) {
// Question textfield is initially empty.
auto* const question_textfield = views::AsViewClass<views::Textfield>(
panel_view()->GetViewByID(mahi_constants::ViewId::kQuestionTextfield));
@ -1001,7 +1001,7 @@ TEST_F(MahiPanelViewTest, QuestionTextfieldEmptyInput) {
// Tests that the question textfield trims whitespace from the front and back of
// the provided text.
TEST_F(MahiPanelViewTest, QuestionTextfieldTrimWhitespace) {
TEST_F(MahiPanelViewTest, QuestionTextfield_TrimWhitespace) {
// Set a text in the textfield with leading and trailing whitespace.
auto* const question_textfield = views::AsViewClass<views::Textfield>(
panel_view()->GetViewByID(mahi_constants::ViewId::kQuestionTextfield));
@ -1715,7 +1715,7 @@ TEST_F(MahiPanelViewTest, ContentSourceButtonUrlAfterRefresh) {
// Tests that refreshing Summary contents will bring the user to the Summary
// View and clear all previously added Q&A text bubbles.
TEST_F(MahiPanelViewTest, RefreshSummaryContentsTransitionToSummaryView) {
TEST_F(MahiPanelViewTest, RefreshSummaryContents_TransitionToSummaryView) {
ON_CALL(mock_mahi_manager(), AnswerQuestion)
.WillByDefault(
[](const std::u16string& question, bool current_panel_content,

@ -511,7 +511,7 @@ TEST_F(NetworkFeaturePodControllerTest, HasCorrectLabel) {
EXPECT_EQ(base::ASCIIToUTF16(kNetworkGuidWifi), GetLabelText());
}
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelCellular) {
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabel_Cellular) {
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_SUBLABEL),
GetSubLabelText());
@ -577,7 +577,7 @@ TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelCellular) {
}
}
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelEthernet) {
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabel_Ethernet) {
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_SUBLABEL),
GetSubLabelText());
@ -609,7 +609,7 @@ TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelEthernet) {
GetSubLabelText());
}
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelTether) {
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabel_Tether) {
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_SUBLABEL),
GetSubLabelText());
@ -649,7 +649,7 @@ TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelTether) {
network_state_handler()));
}
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabelWiFi) {
TEST_F(NetworkFeaturePodControllerTest, HasCorrectSubLabel_WiFi) {
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_SUBLABEL),
GetSubLabelText());

@ -996,7 +996,7 @@ TEST_F(NightLightTest, TestCustomScheduleInvertedStartAndEndTimesCase3) {
EXPECT_EQ(base::Hours(5), controller->timer()->GetCurrentDelay());
}
TEST_F(NightLightTest, TestAmbientLightEnabledSettingFeatureOn) {
TEST_F(NightLightTest, TestAmbientLightEnabledSetting_FeatureOn) {
base::test::ScopedFeatureList features;
features.InitAndEnableFeature(features::kAllowAmbientEQ);
@ -1009,7 +1009,7 @@ TEST_F(NightLightTest, TestAmbientLightEnabledSettingFeatureOn) {
EXPECT_TRUE(GetController()->GetAmbientColorEnabled());
}
TEST_F(NightLightTest, TestAmbientLightEnabledSettingFeatureOff) {
TEST_F(NightLightTest, TestAmbientLightEnabledSetting_FeatureOff) {
// With the feature disabled it should always be disabled.
base::test::ScopedFeatureList features;
features.InitAndDisableFeature(features::kAllowAmbientEQ);

@ -333,7 +333,7 @@ TEST_F(OngoingProcessViewTest, UpdateWithNotification) {
}
// Tests that the notification pill button can be updated with a new text.
TEST_F(OngoingProcessViewTest, UpdateWithNotificationPillButton) {
TEST_F(OngoingProcessViewTest, UpdateWithNotification_PillButton) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Create a notification with a pill button.
@ -381,7 +381,7 @@ TEST_F(OngoingProcessViewTest, UpdateWithNotificationPillButton) {
}
// Tests that the notification buttons can be updated with new icons.
TEST_F(OngoingProcessViewTest, UpdateWithNotificationIconButtons) {
TEST_F(OngoingProcessViewTest, UpdateWithNotification_IconButtons) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Create a notification with two icons.

@ -148,7 +148,7 @@ TEST_F(PhoneHubUiControllerTest, OnboardingNotEligible) {
histograms.ExpectTotalCount(kScreenOnOpenedMetric, 0);
}
TEST_F(PhoneHubUiControllerTest, ShowOnboardingUiWithoutPhone) {
TEST_F(PhoneHubUiControllerTest, ShowOnboardingUi_WithoutPhone) {
base::HistogramTester histograms;
GetFeatureStatusProvider()->SetStatus(
FeatureStatus::kEligiblePhoneButNotSetUp);
@ -165,7 +165,7 @@ TEST_F(PhoneHubUiControllerTest, ShowOnboardingUiWithoutPhone) {
histograms.ExpectTotalCount(kScreenOnOpenedMetric, 0);
}
TEST_F(PhoneHubUiControllerTest, ShowOnboardingUiWithPhone) {
TEST_F(PhoneHubUiControllerTest, ShowOnboardingUi_WithPhone) {
base::HistogramTester histograms;
GetFeatureStatusProvider()->SetStatus(FeatureStatus::kDisabled);
EXPECT_TRUE(ui_state_changed_);
@ -201,7 +201,7 @@ TEST_F(PhoneHubUiControllerTest, BluetoothOff) {
histograms.ExpectTotalCount(kScreenOnOpenedMetric, 0);
}
TEST_F(PhoneHubUiControllerTest, PhoneConnectingDiscoveredRecently) {
TEST_F(PhoneHubUiControllerTest, PhoneConnecting_DiscoveredRecently) {
base::HistogramTester histograms;
phone_hub_manager_.set_host_last_seen_timestamp(base::Time::Now());
GetTetherController()->SetStatus(
@ -216,7 +216,7 @@ TEST_F(PhoneHubUiControllerTest, PhoneConnectingDiscoveredRecently) {
phone_hub_metrics::Screen::kPhoneConnecting, 1);
}
TEST_F(PhoneHubUiControllerTest, PhoneConnectingDiscoveredHoursAgo) {
TEST_F(PhoneHubUiControllerTest, PhoneConnecting_DiscoveredHoursAgo) {
base::HistogramTester histograms;
phone_hub_manager_.set_host_last_seen_timestamp(base::Time::Now() -
base::Hours(10));
@ -231,7 +231,7 @@ TEST_F(PhoneHubUiControllerTest, PhoneConnectingDiscoveredHoursAgo) {
histograms.ExpectTotalCount(kScreenOnOpenedMetric, 0);
}
TEST_F(PhoneHubUiControllerTest, PhoneConnectingNeverDiscovered) {
TEST_F(PhoneHubUiControllerTest, PhoneConnecting_NeverDiscovered) {
base::HistogramTester histograms;
GetTetherController()->SetStatus(
phonehub::TetherController::Status::kConnectionAvailable);

@ -632,7 +632,7 @@ TEST_F(PeripheralBatteryListenerTest,
mock_device_1_.get(), false);
}
TEST_F(PeripheralBatteryListenerTest, BluetoothRemoveAndReconnect) {
TEST_F(PeripheralBatteryListenerTest, Bluetooth_RemoveAndReconnect) {
testing::StrictMock<MockPeripheralBatteryObserver> listener_observer_mock;
base::ScopedObservation<PeripheralBatteryListener,
PeripheralBatteryListener::Observer>
@ -1033,7 +1033,7 @@ TEST_F(PeripheralBatteryListenerTest, Charger) {
// TODO(b/215381232): Temporarily support both 'PCHG' name and 'peripheral' name
// till upstream kernel driver is merged. Remove test case when upstream kernel
// driver is merged.
TEST_F(PeripheralBatteryListenerTest, ChargerPCHG) {
TEST_F(PeripheralBatteryListenerTest, Charger_PCHG) {
testing::StrictMock<MockPeripheralBatteryObserver> listener_observer_mock;
base::ScopedObservation<PeripheralBatteryListener,
PeripheralBatteryListener::Observer>

@ -213,7 +213,7 @@ INSTANTIATE_TEST_SUITE_P(All,
// Tests the functionalities that press the volume key first and then press
// volume down and volume up key alternative.
TEST_F(PowerButtonScreenshotControllerTest, VolumeKeyPressedFirstScreenshot) {
TEST_F(PowerButtonScreenshotControllerTest, VolumeKeyPressedFirst_Screenshot) {
// Tests when volume up pressed first, it waits for power button pressed
// screenshot chord.
PressKey(ui::VKEY_VOLUME_UP);

@ -229,7 +229,7 @@ TEST_F(PowerEventObserverTest, DelayResuspendForLockAnimations) {
// Tests that device suspend is delayed for screen lock until the screen lock
// changes are composited for all root windows.
TEST_F(PowerEventObserverTest, DelaySuspendForCompositingMultiDisplay) {
TEST_F(PowerEventObserverTest, DelaySuspendForCompositing_MultiDisplay) {
SetCanLockScreen(true);
SetShouldLockScreenAutomatically(true);
@ -716,12 +716,12 @@ TEST_F(LockOnSuspendUsageTest, LockOnSuspendUsage) {
// TODO(crbug.com/40898491): Test is failing on "Linux ChromiumOS MSan Tests".
#if defined(MEMORY_SANITIZER)
#define MAYBE_NoShouldLockScreenAutomatically \
DISABLED_NoShouldLockScreenAutomatically
#define MAYBE_No_ShouldLockScreenAutomatically \
DISABLED_No_ShouldLockScreenAutomatically
#else
#define MAYBE_NoShouldLockScreenAutomatically NoShouldLockScreenAutomatically
#define MAYBE_No_ShouldLockScreenAutomatically No_ShouldLockScreenAutomatically
#endif
TEST_F(LockOnSuspendUsageTest, MAYBE_NoShouldLockScreenAutomatically) {
TEST_F(LockOnSuspendUsageTest, MAYBE_No_ShouldLockScreenAutomatically) {
SetCanLockScreen(true);
SetShouldLockScreenAutomatically(false);
@ -734,7 +734,7 @@ TEST_F(LockOnSuspendUsageTest, MAYBE_NoShouldLockScreenAutomatically) {
histogram_tester.ExpectTotalCount("ChromeOS.FeatureUsage.LockOnSuspend", 0);
}
TEST_F(LockOnSuspendUsageTest, NoCanLockScreen) {
TEST_F(LockOnSuspendUsageTest, No_CanLockScreen) {
SetCanLockScreen(false);
SimulateNewUserFirstLogin("user@gmail.com");
PowerEventObserverTestApi test_api(observer_);

@ -844,7 +844,7 @@ TEST_F(PowerNotificationControllerTest,
"Ash.PowerNotification.TimeToEmptyForCritialState", 1);
}
TEST_F(PowerNotificationControllerTest, HistogramTestTimeToEmptyPluggedIn) {
TEST_F(PowerNotificationControllerTest, HistogramTest_TimeToEmptyPluggedIn) {
// Verify no initial histogram data is recorded.
histogram_tester_->ExpectTotalCount(
"Ash.PowerNotification.TimeToEmptyPluggedIn", 0);

@ -407,7 +407,7 @@ TEST_F(CalendarListModelTest, ClearCalendars) {
EXPECT_EQ(0u, calendar_list.size());
}
TEST_F(CalendarListModelTest, RecordFetchResultHistogramSuccess) {
TEST_F(CalendarListModelTest, RecordFetchResultHistogram_Success) {
base::HistogramTester histogram_tester;
histogram_tester.ExpectBucketCount("Ash.Calendar.FetchCalendars.Result",
@ -423,7 +423,7 @@ TEST_F(CalendarListModelTest, RecordFetchResultHistogramSuccess) {
/*expected_count=*/1);
}
TEST_F(CalendarListModelTest, RecordFetchResultHistogramFailure) {
TEST_F(CalendarListModelTest, RecordFetchResultHistogram_Failure) {
base::HistogramTester histogram_tester;
histogram_tester.ExpectBucketCount("Ash.Calendar.FetchCalendars.Result",
@ -444,7 +444,7 @@ TEST_F(CalendarListModelTest, RecordFetchResultHistogramFailure) {
/*expected_count=*/0);
}
TEST_F(CalendarListModelTest, RecordFetchResultHistogramCancelled) {
TEST_F(CalendarListModelTest, RecordFetchResultHistogram_Cancelled) {
base::HistogramTester histogram_tester;
// Set mock calendar list and error code in the client.

@ -322,7 +322,7 @@ TEST_F(CalendarUpNextViewTest,
EXPECT_EQ(ScrollPosition(), 0);
}
TEST_F(CalendarUpNextViewTest, ShouldHideScrollButtonsWhenOnlyOneEvent) {
TEST_F(CalendarUpNextViewTest, ShouldHideScrollButtons_WhenOnlyOneEvent) {
// Set time override.
base::subtle::ScopedTimeClockOverrides time_override(
[]() { return base::subtle::TimeNowIgnoringOverride().LocalMidnight(); },
@ -340,7 +340,7 @@ TEST_F(CalendarUpNextViewTest, ShouldHideScrollButtonsWhenOnlyOneEvent) {
EXPECT_FALSE(GetScrollRightButton()->GetVisible());
}
TEST_F(CalendarUpNextViewTest, ShouldShowScrollButtonsWhenMultipleEvents) {
TEST_F(CalendarUpNextViewTest, ShouldShowScrollButtons_WhenMultipleEvents) {
// Set time override.
base::subtle::ScopedTimeClockOverrides time_override(
[]() { return base::subtle::TimeNowIgnoringOverride().LocalMidnight(); },
@ -542,7 +542,7 @@ TEST_F(CalendarUpNextViewTest,
}
// Greenlines can be found in b/258648030.
TEST_F(CalendarUpNextViewTest, ShouldFocusViewsInCorrectOrderWhenPressingTab) {
TEST_F(CalendarUpNextViewTest, ShouldFocusViewsInCorrectOrder_WhenPressingTab) {
// Set time override.
base::subtle::ScopedTimeClockOverrides time_override(
[]() { return base::subtle::TimeNowIgnoringOverride().LocalMidnight(); },

@ -122,7 +122,7 @@ TEST_F(CalendarViewPixelTest, Basics) {
// Tests that the scroll view scrolls up when there are not at least 2 weeks
// visible below todays view (without up-next view).
TEST_F(CalendarViewPixelTest, BasicsShowMoreFutureDates) {
TEST_F(CalendarViewPixelTest, Basics_ShowMoreFutureDates) {
// Sets time override.
base::Time date;

@ -2749,7 +2749,7 @@ TEST_F(CalendarViewWithUpNextViewTest,
// - Scroll down a couple of months
// - Up next view should be invisible after scrolling
// - Scroll back to today's month, and the up next view should remain invisible.
TEST_F(CalendarViewWithUpNextViewTest, ShouldNotShowUpNextViewAfterScrolling) {
TEST_F(CalendarViewWithUpNextViewTest, ShouldNotShowUpNextView_AfterScrolling) {
base::Time date;
ASSERT_TRUE(base::Time::FromString("18 Nov 2021 10:00 GMT", &date));
// Set time override.

@ -67,7 +67,7 @@ TEST_F(EventDateFormatterUtilTest,
EXPECT_EQ(actual_end, u"4:30\u202fPM");
}
TEST_F(EventDateFormatterUtilTest, GetFormattedInterval12HourClock) {
TEST_F(EventDateFormatterUtilTest, GetFormattedInterval_12HourClock) {
const char* start_time_string = "22 Nov 2021 23:30 GMT";
const char* end_time_string = "23 Nov 2021 0:30 GMT";
base::Time start_time, end_time;
@ -84,7 +84,7 @@ TEST_F(EventDateFormatterUtilTest, GetFormattedInterval12HourClock) {
EXPECT_EQ(actual, u"3:30\u2009\x2013\u20094:30\u202fPM");
}
TEST_F(EventDateFormatterUtilTest, GetFormattedInterval24HourClock) {
TEST_F(EventDateFormatterUtilTest, GetFormattedInterval_24HourClock) {
const char* start_time_string = "22 Nov 2021 23:30 GMT";
const char* end_time_string = "23 Nov 2021 0:30 GMT";
base::Time start_time, end_time;

@ -112,7 +112,7 @@ class AnchoredNudgeManagerImplTest : public AshTestBase {
};
// Tests that a nudge can be shown and its contents are properly sent.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeSingleNudge) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_SingleNudge) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -139,7 +139,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeSingleNudge) {
}
// Tests that two nudges can be shown on screen at the same time.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeTwoNudges) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_TwoNudges) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
auto* contents_view =
widget->SetContentsView(std::make_unique<views::View>());
@ -178,7 +178,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeTwoNudges) {
// Tests that a nudge with buttons can be shown, execute callbacks and dismiss
// the nudge when the button is pressed.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeWithButtons) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_WithButtons) {
base::HistogramTester histogram_tester;
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
@ -292,7 +292,7 @@ TEST_F(AnchoredNudgeManagerImplTest, DefaultLocation) {
}
// Tests that a nudge without an anchor view is placed on the right on RTL.
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationWithRTL) {
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocation_WithRTL) {
Shelf* shelf = GetPrimaryShelf();
display::Display primary_display = GetPrimaryDisplay();
gfx::Rect display_bounds = primary_display.bounds();
@ -334,7 +334,7 @@ TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationWithRTL) {
// Tests that a nudge without an anchor view updates its baseline based on the
// current hotseat state.
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationWithHotseatShown) {
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocation_WithHotseatShown) {
Shelf* shelf = GetPrimaryShelf();
HotseatWidget* hotseat = shelf->hotseat_widget();
display::Display primary_display = GetPrimaryDisplay();
@ -362,7 +362,7 @@ TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationWithHotseatShown) {
// Tests that a nudge without an anchor view updates its baseline when the shelf
// hides itself.
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationWithAutoHideShelf) {
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocation_WithAutoHideShelf) {
Shelf* shelf = GetPrimaryShelf();
display::Display primary_display = GetPrimaryDisplay();
gfx::Rect display_bounds = primary_display.bounds();
@ -391,7 +391,7 @@ TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationWithAutoHideShelf) {
}
// Tests that a nudge updates its location after zooming in/out the UI.
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationZoom) {
TEST_F(AnchoredNudgeManagerImplTest, DefaultLocation_Zoom) {
const int shelf_size = ShelfConfig::Get()->shelf_size();
gfx::Rect display_bounds;
gfx::Rect nudge_bounds;
@ -430,7 +430,7 @@ TEST_F(AnchoredNudgeManagerImplTest, DefaultLocationZoom) {
// Tests that attempting to show a nudge with an `id` that's in use cancels
// the existing nudge and replaces it with a new nudge.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeNudgeWithIdAlreadyExists) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_NudgeWithIdAlreadyExists) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
auto* contents_view =
widget->SetContentsView(std::make_unique<views::View>());
@ -468,7 +468,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeNudgeWithIdAlreadyExists) {
}
// Tests that a nudge is not created if its anchor view is not visible.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeInvisibleAnchorView) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_InvisibleAnchorView) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -487,7 +487,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeInvisibleAnchorView) {
}
// Tests that a nudge is not created if its anchor view doesn't have a widget.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeAnchorViewWithoutWidget) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_AnchorViewWithoutWidget) {
// Set up nudge data contents.
const std::string id("id");
auto contents_view = std::make_unique<views::View>();
@ -503,7 +503,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeAnchorViewWithoutWidget) {
}
// Tests that a nudge is not created if its anchor view was deleted.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeDeletedAnchorView) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_DeletedAnchorView) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -528,7 +528,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeDeletedAnchorView) {
// Tests that a nudge will not be shown if a `ScopedNudgePause` exists, and even
// if the `scoped_anchored_nudge_pause` gets destroyed, the nudge is dismissed
// and will not be saved.
TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeScopedNudgePause) {
TEST_F(AnchoredNudgeManagerImplTest, ShowNudge_ScopedNudgePause) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -553,7 +553,7 @@ TEST_F(AnchoredNudgeManagerImplTest, ShowNudgeScopedNudgePause) {
// Tests that if a `ScopedNudgePause` creates when a nudge is showing, the nudge
// will be dismissed immediately.
TEST_F(AnchoredNudgeManagerImplTest, CancelNudgeScopedNudgePause) {
TEST_F(AnchoredNudgeManagerImplTest, CancelNudge_ScopedNudgePause) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -663,7 +663,7 @@ TEST_F(AnchoredNudgeManagerImplTest,
// Tests that a nudge that is anchored to the shelf maintains the shelf visible
// while the nudge is being shown and the shelf is on auto-hide.
TEST_F(AnchoredNudgeManagerImplTest, NudgeAnchoredToShelfShelfDoesNotHide) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeAnchoredToShelf_ShelfDoesNotHide) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -692,7 +692,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeAnchoredToShelfShelfDoesNotHide) {
}
// Tests that a nudge closes if its anchor view is made invisible.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesWhenAnchorViewIsHiding) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_WhenAnchorViewIsHiding) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -714,7 +714,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesWhenAnchorViewIsHiding) {
}
// Tests that a nudge closes if its anchor view is deleted.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesWhenAnchorViewIsDeleting) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_WhenAnchorViewIsDeleting) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -764,7 +764,7 @@ TEST_F(AnchoredNudgeManagerImplTest,
}
// Tests that a nudge closes if its anchor view widget is hiding.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesWhenAnchorViewWidgetIsHiding) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_WhenAnchorViewWidgetIsHiding) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -786,7 +786,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesWhenAnchorViewWidgetIsHiding) {
}
// Tests that a nudge is properly destroyed on shutdown.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesOnShutdown) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_OnShutdown) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -802,7 +802,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesOnShutdown) {
}
// Tests that nudges expire after their dismiss timer reaches its end.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesWhenDismissTimerExpires) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_WhenDismissTimerExpires) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -916,7 +916,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeDefaultDurationIsUpdated) {
}
// Tests that nudges are destroyed on session state changes.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesOnSessionStateChanged) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_OnSessionStateChanged) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -942,7 +942,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesOnSessionStateChanged) {
}
// Tests that the nudge widget closes after its hide animation is completed.
TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesOnHideAnimationComplete) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeCloses_OnHideAnimationComplete) {
// Set animations to last a non-zero, faster than normal duration, since the
// regular duration may last longer in tests and cause flakiness.
ui::ScopedAnimationDurationScaleMode test_duration_mode(
@ -973,7 +973,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgeClosesOnHideAnimationComplete) {
ASSERT_FALSE(GetShownNudge(id));
}
TEST_F(AnchoredNudgeManagerImplTest, NudgeHideAnimationInterruptedOnShutdown) {
TEST_F(AnchoredNudgeManagerImplTest, NudgeHideAnimationInterrupted_OnShutdown) {
// Set animations to last their normal duration.
ui::ScopedAnimationDurationScaleMode test_duration_mode(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
@ -1052,7 +1052,7 @@ TEST_F(AnchoredNudgeManagerImplTest,
}
// Tests that the dismiss timer is paused on hover so the nudge won't close.
TEST_F(AnchoredNudgeManagerImplTest, NudgePersistsOnHover) {
TEST_F(AnchoredNudgeManagerImplTest, NudgePersists_OnHover) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -1087,7 +1087,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NudgePersistsOnHover) {
// Tests that the dismiss timer is paused when one of the nudge's children is
// focused so the nudge won't close.
TEST_F(AnchoredNudgeManagerImplTest, NudgePersistsOnFocus) {
TEST_F(AnchoredNudgeManagerImplTest, NudgePersists_OnFocus) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge with a button so the nudge has a focusable child.
@ -1225,7 +1225,7 @@ TEST_F(AnchoredNudgeManagerImplTest, TimeToActionMetric) {
}
// Tests that a nudge is parented to its anchor view, which has a widget.
TEST_F(AnchoredNudgeManagerImplTest, SetParentAnchorViewWithWidget) {
TEST_F(AnchoredNudgeManagerImplTest, SetParent_AnchorViewWithWidget) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -1247,7 +1247,7 @@ TEST_F(AnchoredNudgeManagerImplTest, SetParentAnchorViewWithWidget) {
// Tests that a nudge is not parented to its anchor view if
// `set_anchor_view_as_parent` is not set to true.
TEST_F(AnchoredNudgeManagerImplTest, NotSetParentAnchorViewWithWidget) {
TEST_F(AnchoredNudgeManagerImplTest, NotSetParent_AnchorViewWithWidget) {
std::unique_ptr<views::Widget> widget = CreateFramelessTestWidget();
// Set up nudge data contents.
@ -1269,7 +1269,7 @@ TEST_F(AnchoredNudgeManagerImplTest, NotSetParentAnchorViewWithWidget) {
// Tests that a nudge is not created if its anchor view doesn't have a widget
// but `set_anchor_view_as_parent` is set to true.
TEST_F(AnchoredNudgeManagerImplTest, SetParentAnchorViewWithoutWidget) {
TEST_F(AnchoredNudgeManagerImplTest, SetParent_AnchorViewWithoutWidget) {
// Set up nudge data contents.
const std::string id("id");
auto contents_view = std::make_unique<views::View>();
@ -1348,7 +1348,7 @@ TEST_F(AnchoredNudgeManagerImplTest, FocusTraversable) {
// Tests that a nudge is anchored at the bottom left corner of its anchor
// widget.
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetBottomLeft) {
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidget_BottomLeft) {
std::unique_ptr<views::Widget> anchor_widget =
CreateTestWidget(views::Widget::InitParams::CLIENT_OWNS_WIDGET);
anchor_widget->SetBounds(
@ -1380,7 +1380,7 @@ TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetBottomLeft) {
// Tests that a nudge is anchored at the bottom right corner of its anchor
// widget.
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetBottomRight) {
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidget_BottomRight) {
std::unique_ptr<views::Widget> anchor_widget =
CreateTestWidget(views::Widget::InitParams::CLIENT_OWNS_WIDGET);
anchor_widget->SetBounds(
@ -1411,7 +1411,7 @@ TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetBottomRight) {
}
// Tests that a nudge with an anchor widget is placed on the right on RTL.
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetWithRTL) {
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidget_WithRTL) {
// Turn on RTL mode.
base::i18n::SetRTLForTesting(true);
base::RunLoop().RunUntilIdle();
@ -1455,7 +1455,7 @@ TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetWithRTL) {
// Tests that a nudge is anchored at the bottom left corner of its anchor
// widget in the tablet mode.
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidgetTabletMode) {
TEST_F(AnchoredNudgeManagerImplTest, AnchorInsideWidget_TabletMode) {
ash::TabletModeControllerTestApi().EnterTabletMode();
std::unique_ptr<views::Widget> anchor_widget =

@ -87,7 +87,7 @@ TEST_F(SystemNudgeViewPixelTest, TextOnly) {
"screenshot", /*revision_number=*/0, GetContentsView()));
}
TEST_F(SystemNudgeViewPixelTest, TextOnlyLongText) {
TEST_F(SystemNudgeViewPixelTest, TextOnly_LongText) {
// Set up base nudge data and set a long text.
auto nudge_data = CreateBaseNudgeData();
nudge_data.body_text = long_body_text;

@ -98,7 +98,7 @@ TEST_F(SystemToastViewPixelTest, WithLeadingIconAndButton) {
"screenshot", /*revision_number=*/6, GetContentsView()));
}
TEST_F(SystemToastViewPixelTest, MultilineTextOnly) {
TEST_F(SystemToastViewPixelTest, Multiline_TextOnly) {
GetContentsView()->AddChildView(
std::make_unique<SystemToastView>(kTestLongText));
@ -106,7 +106,7 @@ TEST_F(SystemToastViewPixelTest, MultilineTextOnly) {
"screenshot", /*revision_number=*/5, GetContentsView()));
}
TEST_F(SystemToastViewPixelTest, MultilineWithLeadingIcon) {
TEST_F(SystemToastViewPixelTest, Multiline_WithLeadingIcon) {
GetContentsView()->AddChildView(std::make_unique<SystemToastView>(
/*text=*/kTestLongText, /*dismiss_text=*/std::u16string(),
/*dismiss_callback=*/base::DoNothing(), /*leading_icon=*/kTestIcon));
@ -115,7 +115,7 @@ TEST_F(SystemToastViewPixelTest, MultilineWithLeadingIcon) {
"screenshot", /*revision_number=*/5, GetContentsView()));
}
TEST_F(SystemToastViewPixelTest, MultilineWithButton) {
TEST_F(SystemToastViewPixelTest, Multiline_WithButton) {
GetContentsView()->AddChildView(std::make_unique<SystemToastView>(
/*text=*/kTestLongText, /*dismiss_text=*/kTestButtonText));
@ -123,7 +123,7 @@ TEST_F(SystemToastViewPixelTest, MultilineWithButton) {
"screenshot", /*revision_number=*/5, GetContentsView()));
}
TEST_F(SystemToastViewPixelTest, MultilineWithLeadingIconAndButton) {
TEST_F(SystemToastViewPixelTest, Multiline_WithLeadingIconAndButton) {
GetContentsView()->AddChildView(std::make_unique<SystemToastView>(
/*text=*/kTestLongText, /*dismiss_text=*/kTestButtonText,
/*dismiss_callback=*/base::DoNothing(), /*leading_icon=*/kTestIcon));

@ -165,7 +165,7 @@ TEST_F(FeatureTilePixelTest, PrimaryTileWithoutDiveInButton) {
/*revision_number=*/0, widget_.get()));
}
TEST_F(FeatureTilePixelTest, PrimaryTileRTL) {
TEST_F(FeatureTilePixelTest, PrimaryTile_RTL) {
// Turn on RTL mode.
base::i18n::SetRTLForTesting(true);
base::RunLoop().RunUntilIdle();

@ -716,7 +716,7 @@ TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteOptInNudge) {
EXPECT_FALSE(IsNudgeShown(nudge_id));
}
TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteOptInNudgeOptOut) {
TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteOptInNudge_OptOut) {
const auto* nudge_id = kVideoConferenceTraySpeakOnMuteOptInNudgeId;
// Ensure relevant prefs have been registered.
@ -753,7 +753,7 @@ TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteOptInNudgeOptOut) {
EXPECT_FALSE(IsNudgeShown(nudge_id));
}
TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteOptInNudgeOptIn) {
TEST_F(VideoConferenceTrayControllerTest, SpeakOnMuteOptInNudge_OptIn) {
const auto* nudge_id = kVideoConferenceTraySpeakOnMuteOptInNudgeId;
// Ensure relevant prefs have been registered.

@ -235,7 +235,7 @@ TEST_F(OnlineWallpaperVariantInfoFetcherTest,
}
// When variants are already populated, params are returned.
TEST_F(OnlineWallpaperVariantInfoFetcherTest, FetchOnlineWallpaperFromInfo) {
TEST_F(OnlineWallpaperVariantInfoFetcherTest, FetchOnlineWallpaper_FromInfo) {
const uint64_t kAssetId = 14;
const GURL kUrl("https://populated_url/14");
const std::string kCollectionId = "PrePopulatedCollection";

@ -169,7 +169,7 @@ class WallpaperPrefManagerTest : public WallpaperPrefManagerTestBase {
WallpaperPrefManagerTest() = default;
};
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoNormal) {
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfo_Normal) {
WallpaperInfo expected_info = InfoWithType(WallpaperType::kDaily);
pref_manager_->SetUserWallpaperInfo(account_id_1, expected_info);
@ -178,7 +178,7 @@ TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoNormal) {
EXPECT_TRUE(actual_info.MatchesSelection(expected_info));
}
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoEphemeral) {
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfo_Ephemeral) {
profile_helper_->is_ephemeral = true;
WallpaperInfo expected_info = InfoWithType(WallpaperType::kDaily);
pref_manager_->SetUserWallpaperInfo(account_id_1, expected_info);
@ -188,12 +188,12 @@ TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoEphemeral) {
EXPECT_TRUE(actual_info.MatchesSelection(expected_info));
}
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoNothingToGetNormal) {
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoNothingToGet_Normal) {
WallpaperInfo info;
EXPECT_FALSE(pref_manager_->GetUserWallpaperInfo(account_id_1, &info));
}
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoNothingToGetEphemeral) {
TEST_F(WallpaperPrefManagerTest, GetWallpaperInfoNothingToGet_Ephemeral) {
profile_helper_->is_ephemeral = true;
WallpaperInfo info;
EXPECT_FALSE(pref_manager_->GetUserWallpaperInfo(account_id_1, &info));
@ -211,7 +211,7 @@ TEST_F(WallpaperPrefManagerTest,
EXPECT_TRUE(actual_info.MatchesSelection(expected_info));
}
TEST_F(WallpaperPrefManagerTest, RemoveUserWallpaperInfoEphemeral) {
TEST_F(WallpaperPrefManagerTest, RemoveUserWallpaperInfo_Ephemeral) {
profile_helper_->is_ephemeral = true;
WallpaperInfo expected_info = InfoWithType(WallpaperType::kDaily);
pref_manager_->SetUserWallpaperInfo(account_id_1, expected_info);
@ -221,7 +221,7 @@ TEST_F(WallpaperPrefManagerTest, RemoveUserWallpaperInfoEphemeral) {
EXPECT_FALSE(pref_manager_->GetUserWallpaperInfo(account_id_1, &actual_info));
}
TEST_F(WallpaperPrefManagerTest, SetWallpaperInfoEphemeralDoesNotChangeLocal) {
TEST_F(WallpaperPrefManagerTest, SetWallpaperInfo_EphemeralDoesNotChangeLocal) {
profile_helper_->is_ephemeral = true;
WallpaperInfo expected_info = InfoWithType(WallpaperType::kDaily);
pref_manager_->SetUserWallpaperInfo(account_id_1, expected_info);
@ -311,7 +311,7 @@ TEST_F(WallpaperPrefManagerTest, SetWallpaperInfoCustom) {
prefs::kSyncableWallpaperInfo, account_id_1, synced_info);
}
TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdateFuture) {
TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdate_Future) {
profile_helper_->RegisterPrefsForAccount(account_id_1);
base::Time time = base::Time::Now();
@ -326,7 +326,7 @@ TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdateFuture) {
Lt(base::Days(3) + base::Minutes(1))));
}
TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdatePast) {
TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdate_Past) {
profile_helper_->RegisterPrefsForAccount(account_id_1);
base::Time time = base::Time::Now();
@ -340,7 +340,7 @@ TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdatePast) {
base::TimeDelta());
}
TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdateRecent) {
TEST_F(WallpaperPrefManagerTest, GetNextDailyRefreshUpdate_Recent) {
profile_helper_->RegisterPrefsForAccount(account_id_1);
base::Time time = base::Time::Now();
@ -488,7 +488,7 @@ TEST_F(WallpaperPrefManagerTest, ShouldNotSyncInIfLocalWallpaperIsSeaPen) {
// Verifies that creating a wallpaper info from prefs with an invalid layout
// enum fails.
TEST_F(WallpaperPrefManagerTest, GetSyncedWallpaperInfoInvalidLayoutEnum) {
TEST_F(WallpaperPrefManagerTest, GetSyncedWallpaperInfo_InvalidLayoutEnum) {
profile_helper_->RegisterPrefsForAccount(account_id_1);
WallpaperInfo info = InfoWithType(WallpaperType::kCustomized);
@ -513,7 +513,7 @@ TEST_F(WallpaperPrefManagerTest, GetSyncedWallpaperInfoInvalidLayoutEnum) {
// Verifies that creating a wallpaper info from prefs with an invalid wallpaper
// type fails.
TEST_F(WallpaperPrefManagerTest, GetSyncedWallpaperInfoInvalidWallpaperType) {
TEST_F(WallpaperPrefManagerTest, GetSyncedWallpaperInfo_InvalidWallpaperType) {
profile_helper_->RegisterPrefsForAccount(account_id_1);
WallpaperInfo info = InfoWithType(WallpaperType::kCustomized);

@ -804,7 +804,7 @@ class InputDataProviderTest : public AshTestBase {
std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_;
};
TEST_F(InputDataProviderTest, GetConnectedDevicesDeviceInfoMapping) {
TEST_F(InputDataProviderTest, GetConnectedDevices_DeviceInfoMapping) {
ui::DeviceEvent event0(ui::DeviceEvent::DeviceType::INPUT,
ui::DeviceEvent::ActionType::ADD,
base::FilePath("/dev/input/event0"));
@ -853,7 +853,7 @@ TEST_F(InputDataProviderTest, GetConnectedDevicesDeviceInfoMapping) {
EXPECT_EQ("Atmel maXTouch Touchscreen", touchscreen->name);
}
TEST_F(InputDataProviderTest, GetConnectedDevicesHasInternalKeyboard) {
TEST_F(InputDataProviderTest, GetConnectedDevices_HasInternalKeyboard) {
// Initialize one internal keyboard in DeviceDataManager.
std::vector<ui::KeyboardDevice> keyboard_devices;
keyboard_devices.push_back(
@ -882,7 +882,7 @@ TEST_F(InputDataProviderTest, GetConnectedDevicesHasInternalKeyboard) {
ASSERT_EQ(1ul, keyboards.size());
}
TEST_F(InputDataProviderTest, GetConnectedDevicesSplitModifierKeyboard) {
TEST_F(InputDataProviderTest, GetConnectedDevices_SplitModifierKeyboard) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(features::kModifierSplit);
@ -932,7 +932,7 @@ TEST_F(InputDataProviderTest, FilterOutSplitModifierKeyboard) {
ASSERT_EQ(0ul, keyboards.size());
}
TEST_F(InputDataProviderTest, GetConnectedDevicesAddEventAfterFirstCall) {
TEST_F(InputDataProviderTest, GetConnectedDevices_AddEventAfterFirstCall) {
{
base::test::TestFuture<std::vector<mojom::KeyboardInfoPtr>,
std::vector<mojom::TouchDeviceInfoPtr>>
@ -970,7 +970,7 @@ TEST_F(InputDataProviderTest, GetConnectedDevicesAddEventAfterFirstCall) {
}
}
TEST_F(InputDataProviderTest, GetConnectedDevicesAddUnusualDevices) {
TEST_F(InputDataProviderTest, GetConnectedDevices_AddUnusualDevices) {
// Add two devices with unusual bus types, and verify connection types.
ui::DeviceEvent event0(ui::DeviceEvent::DeviceType::INPUT,
@ -1005,7 +1005,7 @@ TEST_F(InputDataProviderTest, GetConnectedDevicesAddUnusualDevices) {
EXPECT_EQ(ui::kLogitechTouchKeyboardK400.name, keyboard2->name);
}
TEST_F(InputDataProviderTest, GetConnectedDevicesRemove) {
TEST_F(InputDataProviderTest, GetConnectedDevices_Remove) {
ui::DeviceEvent add_touch_event(ui::DeviceEvent::DeviceType::INPUT,
ui::DeviceEvent::ActionType::ADD,
base::FilePath("/dev/input/event1"));
@ -1056,7 +1056,7 @@ TEST_F(InputDataProviderTest, GetConnectedDevicesRemove) {
}
}
TEST_F(InputDataProviderTest, GetConnectedDevicesNoExternalKeyboards) {
TEST_F(InputDataProviderTest, GetConnectedDevices_NoExternalKeyboards) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(
features::kEnableExternalKeyboardsInDiagnostics);
@ -1197,7 +1197,7 @@ TEST_F(InputDataProviderTest, KeyboardRegionDetection) {
EXPECT_EQ(std::nullopt, external_keyboard->region_code);
}
TEST_F(InputDataProviderTest, KeyboardRegionDetectionFailure) {
TEST_F(InputDataProviderTest, KeyboardRegionDetection_Failure) {
statistics_provider_.ClearMachineStatistic(system::kRegionKey);
ui::DeviceEvent event_internal(ui::DeviceEvent::DeviceType::INPUT,
@ -1272,7 +1272,7 @@ TEST_F(InputDataProviderTest, KeyboardNumberPadDetectionInternal) {
builtin_keyboard->number_pad_present);
}
TEST_F(InputDataProviderTest, KeyboardTopRightKeyClamshell) {
TEST_F(InputDataProviderTest, KeyboardTopRightKey_Clamshell) {
// Devices without a tablet mode switch should be assumed to be clamshells,
// with a power key in the top-right.
ui::DeviceEvent event_keyboard(ui::DeviceEvent::DeviceType::INPUT,
@ -1294,7 +1294,7 @@ TEST_F(InputDataProviderTest, KeyboardTopRightKeyClamshell) {
EXPECT_EQ(mojom::TopRightKey::kPower, keyboard->top_right_key);
}
TEST_F(InputDataProviderTest, KeyboardTopRightKeyConvertibleModeSwitchFirst) {
TEST_F(InputDataProviderTest, KeyboardTopRightKey_Convertible_ModeSwitchFirst) {
// Devices with a tablet mode switch should be assumed to be convertibles,
// with a lock key in the top-right.
ui::DeviceEvent event_mode_switch(ui::DeviceEvent::DeviceType::INPUT,
@ -1320,7 +1320,7 @@ TEST_F(InputDataProviderTest, KeyboardTopRightKeyConvertibleModeSwitchFirst) {
EXPECT_EQ(mojom::TopRightKey::kLock, keyboard->top_right_key);
}
TEST_F(InputDataProviderTest, KeyboardTopRightKeyConvertibleKeyboardFirst) {
TEST_F(InputDataProviderTest, KeyboardTopRightKey_Convertible_KeyboardFirst) {
// Devices with a tablet mode switch should be assumed to be convertibles,
// with a lock key in the top-right, even if we get the tablet mode switch
// event after the keyboard event.
@ -1347,7 +1347,7 @@ TEST_F(InputDataProviderTest, KeyboardTopRightKeyConvertibleKeyboardFirst) {
EXPECT_EQ(mojom::TopRightKey::kLock, keyboard->top_right_key);
}
TEST_F(InputDataProviderTest, KeyboardTopRightKeyDetachable) {
TEST_F(InputDataProviderTest, KeyboardTopRightKey_Detachable) {
// "Internal" keyboards which are connected by USB are actually detachable,
// and therefore should be assumed to have a lock key in the top-right.
ui::DeviceEvent event_keyboard(ui::DeviceEvent::DeviceType::INPUT,
@ -1369,7 +1369,7 @@ TEST_F(InputDataProviderTest, KeyboardTopRightKeyDetachable) {
EXPECT_EQ(mojom::TopRightKey::kLock, keyboard->top_right_key);
}
TEST_F(InputDataProviderTest, ObserveConnectedDevicesKeyboards) {
TEST_F(InputDataProviderTest, ObserveConnectedDevices_Keyboards) {
FakeConnectedDevicesObserver fake_observer;
provider_->ObserveConnectedDevices(
fake_observer.receiver.BindNewPipeAndPassRemote());
@ -1391,7 +1391,7 @@ TEST_F(InputDataProviderTest, ObserveConnectedDevicesKeyboards) {
EXPECT_EQ(4u, fake_observer.keyboards_disconnected[0]);
}
TEST_F(InputDataProviderTest, ObserveConnectedDevicesTouchDevices) {
TEST_F(InputDataProviderTest, ObserveConnectedDevices_TouchDevices) {
FakeConnectedDevicesObserver fake_observer;
provider_->ObserveConnectedDevices(
fake_observer.receiver.BindNewPipeAndPassRemote());
@ -1413,7 +1413,7 @@ TEST_F(InputDataProviderTest, ObserveConnectedDevicesTouchDevices) {
EXPECT_EQ(1u, fake_observer.touch_devices_disconnected[0]);
}
TEST_F(InputDataProviderTest, ObserveConnectedDevicesNoExternalKeyboards) {
TEST_F(InputDataProviderTest, ObserveConnectedDevices_NoExternalKeyboards) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndDisableFeature(
features::kEnableExternalKeyboardsInDiagnostics);
@ -1468,7 +1468,7 @@ TEST_F(InputDataProviderTest, SillyDeviceDoesNotCrash) {
base::RunLoop().RunUntilIdle();
}
TEST_F(InputDataProviderTest, GetKeyboardMechanicalLayoutUnknown1) {
TEST_F(InputDataProviderTest, GetKeyboardMechanicalLayout_Unknown1) {
statistics_provider_.ClearMachineStatistic(
system::kKeyboardMechanicalLayoutKey);
@ -1499,7 +1499,7 @@ TEST_F(InputDataProviderTest, GetKeyboardMechanicalLayoutUnknown1) {
}
}
TEST_F(InputDataProviderTest, GetKeyboardMechanicalLayoutUnknown2) {
TEST_F(InputDataProviderTest, GetKeyboardMechanicalLayout_Unknown2) {
statistics_provider_.SetMachineStatistic(system::kKeyboardMechanicalLayoutKey,
kInvalidMechnicalLayout);
ui::DeviceEvent add_keyboard_event(ui::DeviceEvent::DeviceType::INPUT,

@ -1261,7 +1261,7 @@ TEST_F(SystemDataProviderTest, CpuUsagePtrDataValidation) {
// Validate expected metric NoData error triggered when request for SystemInfo
// returns no system info data.
TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoSystemInfo) {
TEST_F(SystemDataProviderTest, RecordSystemDataError_NoSystemInfo) {
base::HistogramTester histogram_tester;
VerifySystemDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1289,7 +1289,7 @@ TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoSystemInfo) {
// Validate expected metric NoData error triggered when request for SystemInfo
// returns no cpu info data.
TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoCpuInfo) {
TEST_F(SystemDataProviderTest, RecordSystemDataError_NoCpuInfo) {
base::HistogramTester histogram_tester;
VerifySystemDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1324,7 +1324,7 @@ TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoCpuInfo) {
run_loop.Run();
}
TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoPhysicalCpuInfo) {
TEST_F(SystemDataProviderTest, RecordSystemDataError_NoPhysicalCpuInfo) {
base::HistogramTester histogram_tester;
VerifySystemDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1366,7 +1366,7 @@ TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoPhysicalCpuInfo) {
// Validate expected metric ExpectationNotMet error triggered when logical cpu
// info is empty.
TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoLogicalCpuInfo) {
TEST_F(SystemDataProviderTest, RecordSystemDataError_NoLogicalCpuInfo) {
base::HistogramTester histogram_tester;
VerifySystemDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1409,7 +1409,7 @@ TEST_F(SystemDataProviderTest, RecordSystemDataErrorNoLogicalCpuInfo) {
// Validate expected metric ExpectationNotMet error triggered when cpu usage
// delta is zero.
TEST_F(SystemDataProviderTest, RecordSystemDataErrorDeltaZero) {
TEST_F(SystemDataProviderTest, RecordSystemDataError_DeltaZero) {
base::HistogramTester histogram_tester;
VerifySystemDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1443,7 +1443,7 @@ TEST_F(SystemDataProviderTest, RecordSystemDataErrorDeltaZero) {
// Validate expected metric triggered when request for BatteryInfo returns a
// ProbeError.
TEST_F(SystemDataProviderTest, RecordProbeErrorBatteryInfo) {
TEST_F(SystemDataProviderTest, RecordProbeError_BatteryInfo) {
base::HistogramTester histogram_tester;
VerifyProbeErrorBucketCounts(histogram_tester, kProbeErrorBatteryInfo,
/*expected_unknown_error=*/0,
@ -1476,7 +1476,7 @@ TEST_F(SystemDataProviderTest, RecordProbeErrorBatteryInfo) {
// Validate expected metric NoData error triggered when request for SystemInfo
// returns no battery info data.
TEST_F(SystemDataProviderTest, RecordBatteryDataErrorBatteryInfoNoDataError) {
TEST_F(SystemDataProviderTest, RecordBatteryDataError_BatteryInfoNoDataError) {
base::HistogramTester histogram_tester;
VerifyBatteryDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1502,7 +1502,7 @@ TEST_F(SystemDataProviderTest, RecordBatteryDataErrorBatteryInfoNoDataError) {
// Validate expected metric triggered when request for CpuInfo returns a
// ProbeError.
TEST_F(SystemDataProviderTest, RecordProbeErrorCpuInfo) {
TEST_F(SystemDataProviderTest, RecordProbeError_CpuInfo) {
base::HistogramTester histogram_tester;
// Setup Timer
auto timer = std::make_unique<base::MockRepeatingTimer>();
@ -1548,7 +1548,7 @@ TEST_F(SystemDataProviderTest, RecordProbeErrorCpuInfo) {
// Validate expected metric triggered when request for MemoryInfo returns a
// ProbeError.
TEST_F(SystemDataProviderTest, RecordProbeErrorMemoryInfo) {
TEST_F(SystemDataProviderTest, RecordProbeError_MemoryInfo) {
base::HistogramTester histogram_tester;
VerifyProbeErrorBucketCounts(histogram_tester, kProbeErrorMemoryInfo,
/*expected_unknown_error=*/0,
@ -1592,7 +1592,7 @@ TEST_F(SystemDataProviderTest, RecordProbeErrorMemoryInfo) {
// Validate expected metric triggered when request for SystemInfo returns a
// ProbeError.
TEST_F(SystemDataProviderTest, RecordProbeErrorSystemInfo) {
TEST_F(SystemDataProviderTest, RecordProbeError_SystemInfo) {
base::HistogramTester histogram_tester;
VerifyProbeErrorBucketCounts(
histogram_tester, kProbeErrorSystemInfo, /*expected_unknown_error=*/0,
@ -1623,7 +1623,7 @@ TEST_F(SystemDataProviderTest, RecordProbeErrorSystemInfo) {
// Validate expected metric ExpectationNotMet error triggered when
// charge_full_design value from battery_info is zero.
TEST_F(SystemDataProviderTest, RecordBatteryDataErrorChargeFullDesignZero) {
TEST_F(SystemDataProviderTest, RecordBatteryDataError_ChargeFullDesignZero) {
base::HistogramTester histogram_tester;
VerifyBatteryDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1655,7 +1655,7 @@ TEST_F(SystemDataProviderTest, RecordBatteryDataErrorChargeFullDesignZero) {
// Validate expected metric ExpectationNotMet error triggered when
// charge_full value from battery_info is zero.
TEST_F(SystemDataProviderTest, RecordBatteryDataErrorChargeFullZero) {
TEST_F(SystemDataProviderTest, RecordBatteryDataError_ChargeFullZero) {
base::HistogramTester histogram_tester;
VerifyBatteryDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1684,7 +1684,7 @@ TEST_F(SystemDataProviderTest, RecordBatteryDataErrorChargeFullZero) {
// Validate expected metric ExpectationNotMet error triggered when
// has battery info mismatch from two sources.
TEST_F(SystemDataProviderTest, RecordBatteryDataErrorHasBatteryInfoMismatch) {
TEST_F(SystemDataProviderTest, RecordBatteryDataError_HasBatteryInfoMismatch) {
base::HistogramTester histogram_tester;
VerifyBatteryDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,
@ -1705,7 +1705,7 @@ TEST_F(SystemDataProviderTest, RecordBatteryDataErrorHasBatteryInfoMismatch) {
// Validate expected metric NoData error triggered when battery charge status
// returns null.
TEST_F(SystemDataProviderTest, RecordBatteryDataErrorChargeStatusNull) {
TEST_F(SystemDataProviderTest, RecordBatteryDataError_ChargeStatusNull) {
base::HistogramTester histogram_tester;
VerifyBatteryDataErrorBucketCounts(histogram_tester,
/*expected_no_data_error=*/0,

@ -116,7 +116,7 @@ class EchePresenceManagerTest : public testing::Test {
std::unique_ptr<EchePresenceManager> eche_presence_manager_;
};
TEST_F(EchePresenceManagerTest, StopMonitoringPersistentScan) {
TEST_F(EchePresenceManagerTest, StopMonitoring_PersistentScan) {
scoped_feature_list_.InitWithFeatures(
/*enabled_features=*/{},
/*disabled_features=*/{features::kEcheShorterScanningDutyCycle});
@ -184,7 +184,7 @@ TEST_F(EchePresenceManagerTest, StartMonitoring) {
EXPECT_EQ(1u, num_start_monitor_calls_);
}
TEST_F(EchePresenceManagerTest, StartMonitoringPeriodicalScanning) {
TEST_F(EchePresenceManagerTest, StartMonitoring_PeriodicalScanning) {
Reset();
SetFeatureStatus(FeatureStatus::kConnected);
SetStreamStatus(proto::StatusChangeType::TYPE_STREAM_START);

@ -206,7 +206,7 @@ TEST_F(WebviewAuthHandlerTest, AuthPersistentFailure) {
run_loop.Run();
}
TEST_F(WebviewAuthHandlerTest, AuthTransientFailureMaxRetry) {
TEST_F(WebviewAuthHandlerTest, AuthTransientFailure_MaxRetry) {
base::RunLoop run_loop;
base::HistogramTester histogram_tester;

@ -69,7 +69,7 @@ TEST_F(StructuredMetricsServiceWrapperTest,
EXPECT_TRUE(received_event.has_system_uptime());
}
TEST_F(StructuredMetricsServiceWrapperTest, TestComputeEventUptimeValidTimes) {
TEST_F(StructuredMetricsServiceWrapperTest, TestComputeEventUptime_ValidTimes) {
base::TimeDelta system_uptime = base::Seconds(4000);
base::TimeDelta system_timestamp = base::Seconds(10000);
base::TimeDelta event_timestamp = base::Seconds(7000);

@ -48,7 +48,7 @@ class BirchPrivacyNudgeControllerTest : public AshTestBase {
base::Time BirchPrivacyNudgeControllerTest::test_time_;
// Tests that the nudge shows by default.
TEST_F(BirchPrivacyNudgeControllerTest, NudgeShowsByDefault) {
TEST_F(BirchPrivacyNudgeControllerTest, NudgeShows_ByDefault) {
EXPECT_FALSE(IsNudgeShown());
nudge_controller()->MaybeShowNudge(nullptr);
EXPECT_TRUE(IsNudgeShown());
@ -56,7 +56,7 @@ TEST_F(BirchPrivacyNudgeControllerTest, NudgeShowsByDefault) {
// Tests that the nudge does not show if the birch context menu has been
// opened.
TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShowWhenMenuWasOpened) {
TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShow_WhenMenuWasOpened) {
BirchPrivacyNudgeController::DidShowContextMenu();
EXPECT_FALSE(IsNudgeShown());
@ -66,7 +66,7 @@ TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShowWhenMenuWasOpened) {
// Tests that the nudge won't show if the time between shown threshold hasn't
// passed since it was last shown.
TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShowIfRecentlyShown) {
TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShow_IfRecentlyShown) {
SetTestTime(base::Time::Now());
base::subtle::ScopedTimeClockOverrides clock_override(
/*time_override=*/&BirchPrivacyNudgeControllerTest::GetTestTime,
@ -95,7 +95,7 @@ TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShowIfRecentlyShown) {
EXPECT_TRUE(IsNudgeShown());
}
TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShowIfMaxTimesShown) {
TEST_F(BirchPrivacyNudgeControllerTest, NudgeDoesNotShow_IfMaxTimesShown) {
SetTestTime(base::Time::Now());
base::subtle::ScopedTimeClockOverrides clock_override(
/*time_override=*/&BirchPrivacyNudgeControllerTest::GetTestTime,

@ -1850,7 +1850,7 @@ TEST_F(FasterSplitScreenTest,
// Integration test of the `SplitViewOverviewSession` exit point with drag to
// snap action source. Verify that the end-to-end metric is recorded correctly.
TEST_F(FasterSplitScreenTest, KeyMetricsIntegrationTestDragToSnap) {
TEST_F(FasterSplitScreenTest, KeyMetricsIntegrationTest_DragToSnap) {
UpdateDisplay("800x600");
std::unique_ptr<aura::Window> w1(CreateAppWindow());
@ -1912,7 +1912,7 @@ TEST_F(FasterSplitScreenTest, KeyMetricsIntegrationTestDragToSnap) {
// Integration test of the `SplitViewOverviewSession` exit point with window
// size button as the snap action source. Verify that the end-to-end metric is
// recorded correctly.
TEST_F(FasterSplitScreenTest, KeyMetricsIntegrationTestWindowSizeButton) {
TEST_F(FasterSplitScreenTest, KeyMetricsIntegrationTest_WindowSizeButton) {
UpdateDisplay("800x600");
std::unique_ptr<aura::Window> w1(CreateAppWindow());

@ -1003,7 +1003,7 @@ TEST_F(TabletModeWindowManagerTest, KeepFullScreenModeOn) {
}
// Similar to the fullscreen mode, the pinned mode should be kept as well.
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase1) {
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOn_Case1) {
// Scenario: in the default state, pin a window, enter to the tablet mode,
// then unpin.
gfx::Rect rect(20, 140, 100, 100);
@ -1032,7 +1032,7 @@ TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase1) {
EXPECT_FALSE(window_state->IsPinned());
}
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase2) {
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOn_Case2) {
// Scenario: in the tablet mode, pin a window, exit tablet mode, then unpin.
gfx::Rect rect(20, 140, 100, 100);
std::unique_ptr<aura::Window> w1(
@ -1069,7 +1069,7 @@ TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase2) {
EXPECT_FALSE(window_state->IsPinned());
}
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase3) {
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOn_Case3) {
// Scenario: in the default state, pin a window, enter to the tablet mode,
// exit from the tablet mode, then unpin.
gfx::Rect rect(20, 140, 100, 100);
@ -1106,7 +1106,7 @@ TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase3) {
DestroyTabletModeWindowManager();
}
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase4) {
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOn_Case4) {
// Scenario: in tablet mode, pin a window, exit tablet mode, enter tablet mode
// again, then unpin.
gfx::Rect rect(20, 140, 100, 100);
@ -1143,7 +1143,7 @@ TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase4) {
EXPECT_FALSE(window_state->IsPinned());
}
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOnCase5) {
TEST_F(TabletModeWindowManagerTest, KeepPinnedModeOn_Case5) {
std::unique_ptr<aura::Window> w1(CreateWindow(
aura::client::WINDOW_TYPE_NORMAL, gfx::Rect(20, 140, 100, 100)));
WindowState* window_state = WindowState::Get(w1.get());

@ -17,19 +17,19 @@ namespace {
// TODO(elkurin): Migrate this into chromeos common test with lacros.
class WindowPinUtilTest : public ash::AshTestBase {};
TEST_F(WindowPinUtilTest, IsPinnedPinned) {
TEST_F(WindowPinUtilTest, IsPinned_Pinned) {
std::unique_ptr<aura::Window> window = CreateTestWindow();
PinWindow(window.get(), /*trusted=*/false);
EXPECT_TRUE(IsWindowPinned(window.get()));
}
TEST_F(WindowPinUtilTest, IsPinnedTrustedPinned) {
TEST_F(WindowPinUtilTest, IsPinned_TrustedPinned) {
std::unique_ptr<aura::Window> window = CreateTestWindow();
PinWindow(window.get(), /*trusted=*/true);
EXPECT_TRUE(IsWindowPinned(window.get()));
}
TEST_F(WindowPinUtilTest, IsPinnedUnpinned) {
TEST_F(WindowPinUtilTest, IsPinned_Unpinned) {
std::unique_ptr<aura::Window> window = CreateTestWindow();
PinWindow(window.get(), /*trusted=*/true);
ASSERT_TRUE(IsWindowPinned(window.get()));
@ -38,7 +38,7 @@ TEST_F(WindowPinUtilTest, IsPinnedUnpinned) {
EXPECT_FALSE(IsWindowPinned(window.get()));
}
TEST_F(WindowPinUtilTest, IsPinnedFullscreenNotPinned) {
TEST_F(WindowPinUtilTest, IsPinned_FullscreenNotPinned) {
std::unique_ptr<aura::Window> window = CreateTestWindow();
wm::SetWindowFullscreen(window.get(), /*fullscreen=*/true);
EXPECT_FALSE(IsWindowPinned(window.get()));

Some files were not shown because too many files have changed in this diff Show More