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

Unified Diff: ash/mus/accelerators/accelerator_controller_unittest.cc

Issue 2625873007: Promotes WmWindowMus functions to WmWindowAura and nukes WmWindowMus (Closed)
Patch Set: merge Created 3 years, 11 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 | « ash/mus/accelerators/accelerator_controller_registrar.cc ('k') | ash/mus/bridge/wm_lookup_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/mus/accelerators/accelerator_controller_unittest.cc b/ash/mus/accelerators/accelerator_controller_unittest.cc
index c3aa74848f550582b098df4a4dd5a75ffdad0fb7..b72e3a264a23a24a81a87dcfcb4928df7268911f 100644
--- a/ash/mus/accelerators/accelerator_controller_unittest.cc
+++ b/ash/mus/accelerators/accelerator_controller_unittest.cc
@@ -4,6 +4,7 @@
#include "ash/common/accelerators/accelerator_controller.h"
+#include "ash/aura/wm_window_aura.h"
#include "ash/common/accelerators/accelerator_table.h"
#include "ash/common/accessibility_delegate.h"
#include "ash/common/accessibility_types.h"
@@ -22,7 +23,6 @@
#include "ash/common/wm_shell.h"
#include "ash/mus/accelerators/accelerator_controller_registrar_test_api.h"
#include "ash/mus/bridge/wm_shell_mus_test_api.h"
-#include "ash/mus/bridge/wm_window_mus.h"
#include "ash/mus/property_util.h"
#include "ash/mus/test/wm_test_base.h"
#include "ash/public/cpp/shell_window_ids.h"
@@ -435,7 +435,7 @@ TEST_F(AcceleratorControllerTest, IsRegistered) {
TEST_F(AcceleratorControllerTest, WindowSnap) {
aura::Window* aura_window = CreateTestWindow(gfx::Rect(5, 5, 20, 20));
- WmWindow* window = mus::WmWindowMus::Get(aura_window);
+ WmWindow* window = WmWindowAura::Get(aura_window);
wm::WindowState* window_state = window->GetWindowState();
window_state->Activate();
@@ -491,7 +491,7 @@ TEST_F(AcceleratorControllerTest, WindowSnap) {
TEST_F(AcceleratorControllerTest, WindowSnapWithoutDocking) {
ASSERT_FALSE(ash::switches::DockedWindowsEnabled());
WmWindow* window =
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
wm::WindowState* window_state = window->GetWindowState();
window_state->Activate();
@@ -545,7 +545,7 @@ TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
WindowSnapLeftDockLeftRestore) {
CreateTestWindow(gfx::Rect(5, 5, 20, 20));
WmWindow* window1 =
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
wm::WindowState* window1_state = window1->GetWindowState();
window1_state->Activate();
@@ -567,7 +567,7 @@ TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
WindowSnapRightDockRightRestore) {
CreateTestWindow(gfx::Rect(5, 5, 20, 20));
WmWindow* window1 =
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
wm::WindowState* window1_state = window1->GetWindowState();
window1_state->Activate();
@@ -588,9 +588,9 @@ TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
WindowSnapLeftDockLeftSnapRight) {
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
WmWindow* window1 =
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
wm::WindowState* window1_state = window1->GetWindowState();
window1_state->Activate();
@@ -614,22 +614,22 @@ TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
WindowDockLeftMinimizeWindowWithRestore) {
WindowOwner window_owner(
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
WindowOwner window1_owner(
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
WmWindow* window1 = window1_owner.window();
wm::WindowState* window1_state = window1->GetWindowState();
window1_state->Activate();
WindowOwner window2_owner(
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
WmWindow* window2 = window2_owner.window();
wm::WindowState* window2_state = window2->GetWindowState();
WindowOwner window3_owner(
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
WmWindow* window3 = window3_owner.window();
wm::WindowState* window3_state = window3->GetWindowState();
@@ -667,7 +667,7 @@ TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
WindowPanelDockLeftDockRightRestore) {
WmWndow* window0 =
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
std::unique_ptr<aura::Window> window(CreatePanel());
wm::WindowState* window_state = wm::GetWindowState(window.get());
@@ -695,7 +695,7 @@ TEST_F(EnabledDockedWindowsAcceleratorControllerTest,
TEST_F(EnabledDockedWindowsAcceleratorControllerTest, CenterWindowAccelerator) {
WindowOwner window_owner(
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20))));
WmWindow* window = window_owner.window();
wm::WindowState* window_state = window->GetWindowState();
window_state->Activate();
@@ -802,7 +802,7 @@ TEST_F(AcceleratorControllerTest, DontRepeatToggleFullscreen) {
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW);
params.bounds = gfx::Rect(5, 5, 20, 20);
views::Widget* widget = new views::Widget;
- mus::WmWindowMus::Get(GetPrimaryRootWindow())
+ WmWindowAura::Get(GetPrimaryRootWindow())
->GetRootWindowController()
->ConfigureWidgetInitParamsForContainer(
widget, kShellWindowId_DefaultContainer, &params);
@@ -1144,8 +1144,8 @@ class PreferredReservedAcceleratorsTest : public test::AshTestBase {
// TODO: needs LockStateController ported: http://crbug.com/632189.
TEST_F(PreferredReservedAcceleratorsTest, AcceleratorsWithFullscreen) {
- WmWindow* w1 = mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect()));
- WmWindow* w2 = mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect()));
+ WmWindow* w1 = WmWindowAura::Get(CreateTestWindow(gfx::Rect()));
+ WmWindow* w2 = WmWindowAura::Get(CreateTestWindow(gfx::Rect()));
wm::ActivateWindow(w1);
wm::WMEvent fullscreen(wm::WM_EVENT_FULLSCREEN);
@@ -1241,7 +1241,7 @@ TEST_F(AcceleratorControllerTest, DisallowedAtModalWindow) {
<< " kDeveloperAcceleratorData action: " << action;
}
WmWindow* window =
- mus::WmWindowMus::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
+ WmWindowAura::Get(CreateTestWindow(gfx::Rect(5, 5, 20, 20)));
window->Activate();
WmShell::Get()->SimulateModalWindowOpenForTesting(true);
for (const auto& action : all_actions) {
@@ -1339,7 +1339,7 @@ TEST_F(AcceleratorControllerTest, DISABLED_DisallowedWithNoWindow) {
// Make sure we don't alert if we do have a window.
for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
aura::Window* aura_window = CreateTestWindow(gfx::Rect(5, 5, 20, 20));
- mus::WmWindowMus::Get(aura_window)->Activate();
+ WmWindowAura::Get(aura_window)->Activate();
delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
GetController()->PerformActionIfEnabled(kActionsNeedingWindow[i]);
EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED);
@@ -1349,7 +1349,7 @@ TEST_F(AcceleratorControllerTest, DISABLED_DisallowedWithNoWindow) {
// Don't alert if we have a minimized window either.
for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
aura::Window* aura_window = CreateTestWindow(gfx::Rect(5, 5, 20, 20));
- mus::WmWindowMus::Get(aura_window)->Activate();
+ WmWindowAura::Get(aura_window)->Activate();
GetController()->PerformActionIfEnabled(WINDOW_MINIMIZE);
delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
GetController()->PerformActionIfEnabled(kActionsNeedingWindow[i]);
« no previous file with comments | « ash/mus/accelerators/accelerator_controller_registrar.cc ('k') | ash/mus/bridge/wm_lookup_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698