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

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

Issue 2802403002: 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 816d3d47721d717040f13e9856f7c977bc5525b6..5ce8dc86e276f52ec82dfeb732d09e70fc324142 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
@@ -22,6 +22,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/shell.h"
#include "ash/test/ash_test_helper.h"
@@ -4063,66 +4064,6 @@ TEST_F(ChromeLauncherControllerOrientationTest, ArcOrientationLock) {
EXPECT_FALSE(controller->rotation_locked());
}
-TEST_F(ChromeLauncherControllerOrientationTest, CurrentWithLandscapeDisplay) {
- ASSERT_TRUE(display::Display::HasInternalDisplay());
-
- extension_service_->AddExtension(arc_support_host_.get());
- EnableArc(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_F(ChromeLauncherControllerArcDefaultAppsTest, DefaultApps) {
arc_test_.SetUp(profile());
« 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