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

Side by Side Diff: ash/system/chromeos/tray_display_unittest.cc

Issue 1261693004: Allow dynamic enabling/disabling of unified desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698