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

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 tests 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 9bc97bd5fc50d1d253487e3b8736831903e3256e..14c76d76b20aa8c7313db1b1b4e94caca8830575 100644
--- a/ash/system/chromeos/screen_layout_observer_unittest.cc
+++ b/ash/system/chromeos/screen_layout_observer_unittest.cc
@@ -10,7 +10,6 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/display_manager_test_api.h"
-#include "ash/test/test_system_tray_delegate.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -105,9 +104,6 @@ ScreenLayoutObserverTest::GetDisplayNotification() const {
}
TEST_F(ScreenLayoutObserverTest, DisplayNotifications) {
- test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
- tray_delegate->set_should_show_display_notification(true);
-
UpdateDisplay("400x400");
display::Display::SetInternalDisplayId(display_manager()->first_display_id());
EXPECT_TRUE(GetDisplayNotificationText().empty());
@@ -212,8 +208,6 @@ 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);
UpdateDisplay("400x400,200x200");
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_DISPLAY_EXTENDED_NO_INTERNAL),
@@ -238,10 +232,7 @@ TEST_F(ScreenLayoutObserverTest, DisplayConfigurationChangedTwice) {
TEST_F(ScreenLayoutObserverTest, UpdateAfterSuppressDisplayNotification) {
UpdateDisplay("400x400,200x200");
- test::TestSystemTrayDelegate* tray_delegate = GetSystemTrayDelegate();
- tray_delegate->set_should_show_display_notification(true);
-
- // rotate the second.
+ // Rotate the second.
UpdateDisplay("400x400,200x200/r");
EXPECT_EQ(l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetSecondDisplayName(),
@@ -253,9 +244,8 @@ 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);
display::Display::SetInternalDisplayId(display_manager()->first_display_id());
+ CloseNotification();
// /o creates the default overscan.
UpdateDisplay("400x400, 300x300/o");

Powered by Google App Engine
This is Rietveld 408576698