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

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

Issue 1138253003: Notificaiton Message for Unified mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/tray_display_unittest.cc
diff --git a/ash/system/chromeos/tray_display_unittest.cc b/ash/system/chromeos/tray_display_unittest.cc
index fe761f4577b9eb056c48c2ced65c6409d8c3d21e..d37b09f06603a21544f24653d8a00332fd6ded57 100644
--- a/ash/system/chromeos/tray_display_unittest.cc
+++ b/ash/system/chromeos/tray_display_unittest.cc
@@ -81,6 +81,7 @@ class TrayDisplayTest : public ash::test::AshTestBase {
protected:
SystemTray* tray() { return tray_; }
TrayDisplay* tray_display() { return tray_display_; }
+ void UpdateTray();
void CloseNotification();
bool IsDisplayVisibleInTray() const;
@@ -110,6 +111,10 @@ TrayDisplayTest::~TrayDisplayTest() {
void TrayDisplayTest::SetUp() {
ash::test::AshTestBase::SetUp();
+ UpdateTray();
+}
+
+void TrayDisplayTest::UpdateTray() {
tray_ = Shell::GetPrimaryRootWindowController()->GetSystemTray();
tray_display_ = new TrayDisplay(tray_);
tray_->AddTrayItem(tray_display_);
@@ -291,6 +296,17 @@ TEST_F(TrayDisplayTest, InternalDisplayResized) {
expected, GetFirstDisplayName(), "600x600", base::string16(), ""),
GetTrayDisplayTooltipText());
CheckAccessibleName();
+
+ // Unified mode
+ display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED);
+ display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED);
+ UpdateDisplay("300x200,400x500");
+ // Update the cache variables as the primary root window changed.
+ UpdateTray();
Jun Mukai 2015/05/13 18:03:49 Resetting the variable explicitly from a test case
+ tray()->ShowDefaultView(BUBBLE_USE_EXISTING);
+ EXPECT_TRUE(IsDisplayVisibleInTray());
+ expected = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_UNIFIED);
+ EXPECT_EQ(expected, GetTrayDisplayText());
}
TEST_F(TrayDisplayTest, ExternalDisplayResized) {
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698