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

Unified Diff: ash/content/display/screen_orientation_controller_chromeos_unittest.cc

Issue 2134753004: mash: Partially migrate ScreenOrientationController to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase; explicitily call OnWindowVisibilityChanging. Created 4 years, 5 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 | « no previous file | ash/content/screen_orientation_delegate_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/content/display/screen_orientation_controller_chromeos_unittest.cc
diff --git a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
index 7874f01382a8c20060f5eb25b62e490c6e4b0406..5fd111c65b2016aab68fa7512fcbbeabb7840907 100644
--- a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
+++ b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
@@ -7,6 +7,7 @@
#include <memory>
#include <vector>
+#include "ash/aura/wm_window_aura.h"
#include "ash/common/ash_switches.h"
#include "ash/common/display/display_info.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
@@ -295,11 +296,15 @@ TEST_F(ScreenOrientationControllerTest, VisibilityChangesLock) {
delegate()->Lock(content.get(), blink::WebScreenOrientationLockLandscape);
EXPECT_TRUE(RotationLocked());
- aura::Window* window = content->GetNativeView();
+ WmWindow* window = WmWindowAura::Get(content->GetNativeView());
+ ScreenOrientationController* controller =
+ Shell::GetInstance()->screen_orientation_controller();
window->Hide();
+ controller->OnWindowVisibilityChanging(window, false);
jonross 2016/07/11 19:48:13 I'm a bit concerned that this is not being trigger
msw 2016/07/11 20:02:31 Might be async WmWindow behavior, or a plumbing is
jonross 2016/07/11 20:10:58 ScreenOrientationController should become a listen
msw 2016/07/11 21:53:10 Thanks for pushing me to dig in; I'll need to impl
EXPECT_FALSE(RotationLocked());
window->Show();
+ controller->OnWindowVisibilityChanging(window, true);
EXPECT_TRUE(RotationLocked());
}
« no previous file with comments | « no previous file | ash/content/screen_orientation_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698