Updates message center width to be 400px
Changes the message center width to be 400px to match the width of Quick Settings. This change is hidden behind a feature flag. Bug: 343768137 Change-Id: Ifdba1ebf62975da43d22b9896968451d3d992d1b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5698652 Reviewed-by: Ahmed Mehfooz <amehfooz@chromium.org> Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by: Andre Le <leandre@chromium.org> Commit-Queue: Bhuvana Betini <bbetini@google.com> Cr-Commit-Position: refs/heads/main@{#1329851}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
a42169fbd1
commit
ac0d728862
ash
capture_mode
public
cpp
external_arc
message_center
scalable_iph
system
notification_center
@ -141,7 +141,7 @@ TEST_P(DisplayParameterizedCaptureModePixelTest,
|
||||
GetScreenshotName(base::StrCat({"screen_capture_popup_notification_",
|
||||
GetDisplayTypeName(GetDisplayType())}),
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/0,
|
||||
/*revision_number=*/1,
|
||||
test_api()->GetPopupViewForId(kScreenCaptureNotificationId)));
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ TEST_P(DisplayParameterizedCaptureModePixelTest, VideoCaptureNotification) {
|
||||
GetScreenshotName(base::StrCat({"video_capture_notification_popup_",
|
||||
GetDisplayTypeName(GetDisplayType())}),
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/0, notification_popup_view));
|
||||
/*revision_number=*/1, notification_popup_view));
|
||||
|
||||
test_api()->ToggleBubble();
|
||||
auto* notification_view =
|
||||
@ -183,7 +183,7 @@ TEST_P(DisplayParameterizedCaptureModePixelTest, VideoCaptureNotification) {
|
||||
GetScreenshotName(base::StrCat({"video_capture_notification_view_",
|
||||
GetDisplayTypeName(GetDisplayType())}),
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/0, notification_view));
|
||||
/*revision_number=*/1, notification_view));
|
||||
}
|
||||
|
||||
} // namespace ash
|
||||
|
@ -288,7 +288,7 @@ ArcNotificationContentView::ArcNotificationContentView(
|
||||
// defined in `ArcNotificationWrapperView` class in Android side.
|
||||
assert(
|
||||
GetNotificationInMessageCenterWidth() ==
|
||||
(chromeos::features::IsNotificationWidthIncreaseEnabled() ? 400 : 344));
|
||||
(chromeos::features::IsNotificationWidthIncreaseEnabled() ? 384 : 344));
|
||||
|
||||
SetFocusBehavior(FocusBehavior::ALWAYS);
|
||||
SetNotifyEnterExitOnChild(true);
|
||||
|
@ -84,6 +84,6 @@ TEST_P(ScalableIphPixelTest, NotificationNoBodyText) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("scalable_iph_notification_no_body_text",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/0, message_view));
|
||||
/*revision_number=*/1, message_view));
|
||||
}
|
||||
} // namespace ash
|
||||
|
@ -61,10 +61,13 @@ inline constexpr float kDarkModeMinContrastRatio = 6.0;
|
||||
|
||||
// Constants for `ash_notification_view`.
|
||||
|
||||
// The width of notification that displayed inside the message center.
|
||||
// The width of notification that is displayed inside the message center.
|
||||
// (Deprecated)
|
||||
inline constexpr int kDeprecatedNotificationInMessageCenterWidth = 344;
|
||||
|
||||
// The width of notification that is displayed inside the message center.
|
||||
inline constexpr int kNotificationInMessageCenterWidth = 384;
|
||||
|
||||
inline constexpr int kProgressBarWithActionButtonsBottomPadding = 16;
|
||||
inline constexpr int kProgressBarExpandedBottomPadding =
|
||||
24 - kNotificationViewPadding.bottom();
|
||||
@ -165,7 +168,7 @@ const char kLockScreenNotifierId[] = "ash.lockscreen_notification_controller";
|
||||
// Returns the width of the notification in the message center.
|
||||
inline int GetNotificationInMessageCenterWidth() {
|
||||
return chromeos::features::IsNotificationWidthIncreaseEnabled()
|
||||
? message_center::kChromeOSNotificationWidth
|
||||
? kNotificationInMessageCenterWidth
|
||||
: kDeprecatedNotificationInMessageCenterWidth;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ TEST_P(AshNotificationViewPixelTest, CloseButtonFocused) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("close_button_focused",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
// Regression test for http://b/267195370. Tests that a notification with no
|
||||
@ -144,7 +144,7 @@ TEST_P(AshNotificationViewPixelTest, CollapsedNoMessage) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("collapsed_no_message",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/2, notification_view));
|
||||
/*revision_number=*/3, notification_view));
|
||||
}
|
||||
|
||||
// Tests that a progress notification does not have its title vertically
|
||||
@ -167,7 +167,7 @@ TEST_P(AshNotificationViewPixelTest, ProgressCollapsed) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("progress_collapsed",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
// Tests the control buttons UI for the case of a notification with just the
|
||||
@ -191,7 +191,7 @@ TEST_P(AshNotificationViewPixelTest, CloseControlButton) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("close_control_button",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
// Tests the control buttons UI for the case of a notification with both the
|
||||
@ -215,7 +215,7 @@ TEST_P(AshNotificationViewPixelTest, SettingsAndCloseControlButtons) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("settings_and_close_control_buttons",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
// Tests the inline reply UI for AshNotificationView.
|
||||
@ -241,7 +241,7 @@ TEST_P(AshNotificationViewPixelTest, InlineReply) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("inline_reply_focused",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
// Tests the focus ring for the expand button in AshNotificationView.
|
||||
@ -258,7 +258,7 @@ TEST_P(AshNotificationViewPixelTest, ExpandButtonFocusRing) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("expand_button_focus_ring",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
TEST_P(AshNotificationViewPixelTest, NotificationViewFocusRing) {
|
||||
@ -272,7 +272,7 @@ TEST_P(AshNotificationViewPixelTest, NotificationViewFocusRing) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("notification_view_focus_ring",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
TEST_P(AshNotificationViewPixelTest, NotificationPopupFocusRing) {
|
||||
@ -290,7 +290,7 @@ TEST_P(AshNotificationViewPixelTest, NotificationPopupFocusRing) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("notification_popup_focus_ring",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/1, notification_view));
|
||||
/*revision_number=*/2, notification_view));
|
||||
}
|
||||
|
||||
// Tests that a notification's icon is sized and positioned correctly at
|
||||
@ -347,7 +347,7 @@ TEST_P(AshNotificationViewIconPixelTest, NotificationIcon) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName(base::StringPrintf("expanded_icon_size_%u", size),
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/2, notification_view));
|
||||
/*revision_number=*/3, notification_view));
|
||||
|
||||
notification_view->ToggleExpand();
|
||||
ASSERT_FALSE(notification_view->IsExpanded());
|
||||
@ -359,7 +359,7 @@ TEST_P(AshNotificationViewIconPixelTest, NotificationIcon) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName(base::StringPrintf("collapsed_icon_size_%u", size),
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/2, notification_view));
|
||||
/*revision_number=*/3, notification_view));
|
||||
}
|
||||
|
||||
class AshNotificationViewTitlePixelTest
|
||||
@ -422,7 +422,7 @@ TEST_P(AshNotificationViewTitlePixelTest, NotificationTitleTest) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
::ash::GetScreenshotName(screenshot_name,
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/2, notification_view));
|
||||
/*revision_number=*/3, notification_view));
|
||||
}
|
||||
|
||||
class AshNotificationViewCollapsedLongTextPixelTest
|
||||
@ -492,7 +492,7 @@ TEST_P(AshNotificationViewCollapsedLongTextPixelTest, ElidedTextSpacing) {
|
||||
EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen(
|
||||
GetScreenshotName("elided_text_spacing",
|
||||
IsNotificationWidthIncreaseEnabled()),
|
||||
/*revision_number=*/2, notification_view));
|
||||
/*revision_number=*/3, notification_view));
|
||||
}
|
||||
|
||||
} // namespace ash
|
||||
|
Reference in New Issue
Block a user