Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2212)

Unified Diff: ash/system/chromeos/screen_layout_observer_unittest.cc

Issue 2400553002: ash: Remove broken display notification suppression when settings is open (Closed)
Patch Set: fix comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/screen_layout_observer_unittest.cc
diff --git a/ash/system/chromeos/screen_layout_observer_unittest.cc b/ash/system/chromeos/screen_layout_observer_unittest.cc
index d92648483e9ec2227716d0d67d93385fc300e6b5..905c4e22f71837d2f47e84d5a58ee5b56d0acf03 100644
--- a/ash/system/chromeos/screen_layout_observer_unittest.cc
+++ b/ash/system/chromeos/screen_layout_observer_unittest.cc
@@ -105,8 +105,9 @@ ScreenLayoutObserverTest::GetDisplayNotification() const {
}
TEST_F(ScreenLayoutObserverTest, DisplayNotifications) {
- test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
- tray_delegate->set_should_show_display_notification(true);
+ Shell::GetInstance()
+ ->screen_layout_observer()
+ ->set_show_notifications_for_testing(true);
UpdateDisplay("400x400");
display::Display::SetInternalDisplayId(display_manager()->first_display_id());
@@ -212,8 +213,9 @@ TEST_F(ScreenLayoutObserverTest, DisplayNotifications) {
// Verify that notification shows up when display is switched from dock mode to
// extend mode.
TEST_F(ScreenLayoutObserverTest, DisplayConfigurationChangedTwice) {
- test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
- tray_delegate->set_should_show_display_notification(true);
+ Shell::GetInstance()
+ ->screen_layout_observer()
+ ->set_show_notifications_for_testing(true);
UpdateDisplay("400x400,200x200");
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL),
@@ -238,10 +240,11 @@ TEST_F(ScreenLayoutObserverTest, DisplayConfigurationChangedTwice) {
TEST_F(ScreenLayoutObserverTest, UpdateAfterSuppressDisplayNotification) {
UpdateDisplay("400x400,200x200");
- test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
- tray_delegate->set_should_show_display_notification(true);
+ Shell::GetInstance()
+ ->screen_layout_observer()
+ ->set_show_notifications_for_testing(true);
- // rotate the second.
+ // Rotate the second.
UpdateDisplay("400x400,200x200/r");
EXPECT_EQ(l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetSecondDisplayName(),
@@ -253,8 +256,9 @@ TEST_F(ScreenLayoutObserverTest, UpdateAfterSuppressDisplayNotification) {
// Verify that no notification is shown when overscan of a screen is changed.
TEST_F(ScreenLayoutObserverTest, OverscanDisplay) {
UpdateDisplay("400x400, 300x300");
- test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
- tray_delegate->set_should_show_display_notification(true);
+ Shell::GetInstance()
+ ->screen_layout_observer()
+ ->set_show_notifications_for_testing(true);
display::Display::SetInternalDisplayId(display_manager()->first_display_id());
// /o creates the default overscan.
« no previous file with comments | « ash/system/chromeos/screen_layout_observer.cc ('k') | ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698