| Index: ash/system/chromeos/screen_layout_observer.cc
|
| diff --git a/ash/system/chromeos/screen_layout_observer.cc b/ash/system/chromeos/screen_layout_observer.cc
|
| index 85f8895b312b0e2915496213990844f261a3399f..cbe46b093ff4d8541dcd164733980ad13920018b 100644
|
| --- a/ash/system/chromeos/screen_layout_observer.cc
|
| +++ b/ash/system/chromeos/screen_layout_observer.cc
|
| @@ -37,6 +37,8 @@ using message_center::Notification;
|
| namespace ash {
|
| namespace {
|
|
|
| +bool g_suppress_notifications_for_testing = false;
|
| +
|
| DisplayManager* GetDisplayManager() {
|
| return Shell::GetInstance()->display_manager();
|
| }
|
| @@ -189,6 +191,10 @@ ScreenLayoutObserver::~ScreenLayoutObserver() {
|
| WmShell::Get()->RemoveDisplayObserver(this);
|
| }
|
|
|
| +void ScreenLayoutObserver::SuppressNotificationsForTesting(bool suppress) {
|
| + g_suppress_notifications_for_testing = suppress;
|
| +}
|
| +
|
| void ScreenLayoutObserver::UpdateDisplayInfo(
|
| ScreenLayoutObserver::DisplayInfoMap* old_info) {
|
| if (old_info)
|
| @@ -300,11 +306,8 @@ void ScreenLayoutObserver::OnDisplayConfigurationChanged() {
|
| DisplayInfoMap old_info;
|
| UpdateDisplayInfo(&old_info);
|
|
|
| - if (!WmShell::Get()
|
| - ->system_tray_delegate()
|
| - ->ShouldShowDisplayNotification()) {
|
| + if (g_suppress_notifications_for_testing)
|
| return;
|
| - }
|
|
|
| base::string16 message;
|
| base::string16 additional_message;
|
|
|