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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2792973002: Resolve current orientation after applying the previous orientation request. (Closed)
Patch Set: . Created 3 years, 8 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 | « chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
index 0ed295f97d6c81054c847ce96435f9299e6ca1f8..2d9dde9bc5386066d224d924f04fd9abe4e1eb63 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
@@ -21,6 +21,7 @@
#include "ash/common/shelf/shelf_model_observer.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
+#include "ash/display/display_configuration_controller.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/public/cpp/app_launch_id.h"
#include "ash/public/cpp/shelf_item.h"
@@ -4069,67 +4070,6 @@ TEST_P(ChromeLauncherControllerOrientationTest, ArcOrientationLock) {
EXPECT_FALSE(controller->rotation_locked());
}
-TEST_P(ChromeLauncherControllerOrientationTest, CurrentWithLandscapeDisplay) {
- ASSERT_TRUE(display::Display::HasInternalDisplay());
-
- extension_service_->AddExtension(arc_support_host_.get());
- EnablePlayStore(true);
- EnableTabletMode(true);
-
- InitLauncherController();
-
- InitApps();
- ash::ScreenOrientationController* controller =
- ash::Shell::GetInstance()->screen_orientation_controller();
-
- // Start with portrait.
- window_portrait_->Activate();
-
- // Create a arc window to lock the CURRENT orientation.
- views::Widget* window_current = CreateArcWindow(window_app_id_current_);
- NotifyOnTaskCreated(appinfo_current_, task_id_current_);
- EXPECT_TRUE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_90,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
-
- // Re-activating changes the orientation to previously locked orientation.
- window_landscape_->Activate();
- EXPECT_TRUE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_0,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
- window_current->Activate();
- EXPECT_TRUE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_90,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
-
- // Exitting and re-entering tablet mode re-locks the orientation.
- EnableTabletMode(false);
- EXPECT_FALSE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_0,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
-
- EnableTabletMode(true);
- EXPECT_TRUE(window_current->IsActive());
- EXPECT_TRUE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_90,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
-
- // Manually unlock, and lock again at landscape.
- NotifyOnTaskOrientationLockRequested(task_id_current_, OrientationLock::NONE);
- window_landscape_->Activate();
- EXPECT_TRUE(controller->rotation_locked());
- window_current->Activate();
- EXPECT_FALSE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_0,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
-
- NotifyOnTaskOrientationLockRequested(task_id_current_,
- OrientationLock::CURRENT);
- EXPECT_TRUE(controller->rotation_locked());
- EXPECT_EQ(display::Display::ROTATE_0,
- display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
-}
-
TEST_P(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
arc_test_.SetUp(profile());
InitLauncherController();
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698