| 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_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 EXPECT_TRUE(IsDisplayVisibleInTray()); | 308 EXPECT_TRUE(IsDisplayVisibleInTray()); |
| 309 expected = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED); | 309 expected = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_DOCKED); |
| 310 EXPECT_EQ(expected, GetTrayDisplayText()); | 310 EXPECT_EQ(expected, GetTrayDisplayText()); |
| 311 EXPECT_EQ( | 311 EXPECT_EQ( |
| 312 GetTooltipText( | 312 GetTooltipText( |
| 313 expected, GetFirstDisplayName(), "600x600", base::string16(), ""), | 313 expected, GetFirstDisplayName(), "600x600", base::string16(), ""), |
| 314 GetTrayDisplayTooltipText()); | 314 GetTrayDisplayTooltipText()); |
| 315 CheckAccessibleName(); | 315 CheckAccessibleName(); |
| 316 | 316 |
| 317 // Unified mode | 317 // Unified mode |
| 318 test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); | 318 display_manager->SetUnifiedDesktopEnabled(true); |
| 319 display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); | |
| 320 display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); | |
| 321 UpdateDisplay("300x200,400x500"); | 319 UpdateDisplay("300x200,400x500"); |
| 322 // Update the cache variables as the primary root window changed. | 320 // Update the cache variables as the primary root window changed. |
| 323 GetTray()->ShowDefaultView(BUBBLE_USE_EXISTING); | 321 GetTray()->ShowDefaultView(BUBBLE_USE_EXISTING); |
| 324 EXPECT_TRUE(IsDisplayVisibleInTray()); | 322 EXPECT_TRUE(IsDisplayVisibleInTray()); |
| 325 expected = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_UNIFIED); | 323 expected = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_UNIFIED); |
| 326 EXPECT_EQ(expected, GetTrayDisplayText()); | 324 EXPECT_EQ(expected, GetTrayDisplayText()); |
| 327 } | 325 } |
| 328 | 326 |
| 329 TEST_F(TrayDisplayTest, ExternalDisplayResized) { | 327 TEST_F(TrayDisplayTest, ExternalDisplayResized) { |
| 330 UpdateDisplay("400x400"); | 328 UpdateDisplay("400x400"); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // rotate the second. | 589 // rotate the second. |
| 592 UpdateDisplay("400x400,200x200/r"); | 590 UpdateDisplay("400x400,200x200/r"); |
| 593 EXPECT_EQ(l10n_util::GetStringFUTF16( | 591 EXPECT_EQ(l10n_util::GetStringFUTF16( |
| 594 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetSecondDisplayName(), | 592 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetSecondDisplayName(), |
| 595 l10n_util::GetStringUTF16( | 593 l10n_util::GetStringUTF16( |
| 596 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90)), | 594 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90)), |
| 597 GetDisplayNotificationAdditionalText()); | 595 GetDisplayNotificationAdditionalText()); |
| 598 } | 596 } |
| 599 | 597 |
| 600 } // namespace ash | 598 } // namespace ash |
| OLD | NEW |