OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/system/chromeos/tray_display.h" | 5 #include "ash/system/chromeos/tray_display.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 l10n_util::GetStringUTF16( | 430 l10n_util::GetStringUTF16( |
431 IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL), | 431 IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL), |
432 GetDisplayNotificationText()); | 432 GetDisplayNotificationText()); |
433 | 433 |
434 // Back to the single display. It SHOULD remove the notification since the | 434 // Back to the single display. It SHOULD remove the notification since the |
435 // information is stale. | 435 // information is stale. |
436 UpdateDisplay("400x400"); | 436 UpdateDisplay("400x400"); |
437 EXPECT_TRUE(GetDisplayNotificationText().empty()); | 437 EXPECT_TRUE(GetDisplayNotificationText().empty()); |
438 } | 438 } |
439 | 439 |
| 440 TEST_F(TrayDisplayTest, UpdateAfterSuppressDisplayNotification) { |
| 441 UpdateDisplay("400x400,200x200"); |
| 442 |
| 443 test::TestSystemTrayDelegate* tray_delegate = |
| 444 static_cast<test::TestSystemTrayDelegate*>( |
| 445 Shell::GetInstance()->system_tray_delegate()); |
| 446 tray_delegate->set_should_show_display_notification(true); |
| 447 |
| 448 // rotate the second. |
| 449 UpdateDisplay("400x400,200x200/r"); |
| 450 EXPECT_EQ( |
| 451 l10n_util::GetStringFUTF16( |
| 452 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, |
| 453 GetSecondDisplayName(), |
| 454 l10n_util::GetStringUTF16( |
| 455 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90)), |
| 456 GetDisplayNotificationText()); |
| 457 } |
| 458 |
440 } // namespace internal | 459 } // namespace internal |
441 } // namespace ash | 460 } // namespace ash |
OLD | NEW |