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

Side by Side Diff: ash/system/screen_layout_observer_unittest.cc

Issue 2909763002: Revert of Rename MaximizeMode to TabletMode (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « ash/system/screen_layout_observer.cc ('k') | ash/test/shell_test_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/screen_layout_observer.h" 5 #include "ash/system/screen_layout_observer.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/strings/grit/ash_strings.h" 8 #include "ash/strings/grit/ash_strings.h"
9 #include "ash/system/devicetype_utils.h" 9 #include "ash/system/devicetype_utils.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
11 #include "ash/test/ash_test_base.h" 11 #include "ash/test/ash_test_base.h"
12 #include "ash/test/test_system_tray_delegate.h" 12 #include "ash/test/test_system_tray_delegate.h"
13 #include "ash/wm/tablet_mode/tablet_mode_controller.h" 13 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "ui/accessibility/ax_node_data.h" 17 #include "ui/accessibility/ax_node_data.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/display/display.h" 19 #include "ui/display/display.h"
20 #include "ui/display/display_layout_builder.h" 20 #include "ui/display/display_layout_builder.h"
21 #include "ui/display/manager/display_manager.h" 21 #include "ui/display/manager/display_manager.h"
22 #include "ui/message_center/message_center.h" 22 #include "ui/message_center/message_center.h"
23 #include "ui/message_center/notification.h" 23 #include "ui/message_center/notification.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 display_manager()->SetDisplayRotation( 461 display_manager()->SetDisplayRotation(
462 primary_id, display::Display::ROTATE_270, 462 primary_id, display::Display::ROTATE_270,
463 display::Display::ROTATION_SOURCE_ACTIVE); 463 display::Display::ROTATION_SOURCE_ACTIVE);
464 EXPECT_EQ(l10n_util::GetStringFUTF16( 464 EXPECT_EQ(l10n_util::GetStringFUTF16(
465 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetFirstDisplayName(), 465 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetFirstDisplayName(),
466 l10n_util::GetStringUTF16( 466 l10n_util::GetStringUTF16(
467 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_270)), 467 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_270)),
468 GetDisplayNotificationAdditionalText()); 468 GetDisplayNotificationAdditionalText());
469 469
470 // Switch to Tablet 470 // Switch to Tablet
471 Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true); 471 Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
472 true);
472 473
473 // The accelerometer source. 474 // The accelerometer source.
474 display_manager()->SetDisplayRotation( 475 display_manager()->SetDisplayRotation(
475 primary_id, display::Display::ROTATE_90, 476 primary_id, display::Display::ROTATE_90,
476 display::Display::ROTATION_SOURCE_ACCELEROMETER); 477 display::Display::ROTATION_SOURCE_ACCELEROMETER);
477 EXPECT_TRUE(GetDisplayNotificationText().empty()); 478 EXPECT_TRUE(GetDisplayNotificationText().empty());
478 479
479 // The user source. 480 // The user source.
480 display_manager()->SetDisplayRotation(primary_id, 481 display_manager()->SetDisplayRotation(primary_id,
481 display::Display::ROTATE_180, 482 display::Display::ROTATE_180,
482 display::Display::ROTATION_SOURCE_USER); 483 display::Display::ROTATION_SOURCE_USER);
483 EXPECT_EQ(l10n_util::GetStringFUTF16( 484 EXPECT_EQ(l10n_util::GetStringFUTF16(
484 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetFirstDisplayName(), 485 IDS_ASH_STATUS_TRAY_DISPLAY_ROTATED, GetFirstDisplayName(),
485 l10n_util::GetStringUTF16( 486 l10n_util::GetStringUTF16(
486 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_180)), 487 IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_180)),
487 GetDisplayNotificationAdditionalText()); 488 GetDisplayNotificationAdditionalText());
488 489
489 // The active source. 490 // The active source.
490 display_manager()->SetDisplayRotation( 491 display_manager()->SetDisplayRotation(
491 primary_id, display::Display::ROTATE_270, 492 primary_id, display::Display::ROTATE_270,
492 display::Display::ROTATION_SOURCE_ACTIVE); 493 display::Display::ROTATION_SOURCE_ACTIVE);
493 EXPECT_TRUE(GetDisplayNotificationText().empty()); 494 EXPECT_TRUE(GetDisplayNotificationText().empty());
494 } 495 }
495 496
496 } // namespace ash 497 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/screen_layout_observer.cc ('k') | ash/test/shell_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698