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

Unified Diff: ash/wm/screen_pinning_controller_unittest.cc

Issue 2907853002: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (removed some more wm_window.h) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/screen_pinning_controller.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/screen_pinning_controller_unittest.cc
diff --git a/ash/wm/screen_pinning_controller_unittest.cc b/ash/wm/screen_pinning_controller_unittest.cc
index cb2c963113e62e3374c155942f1e5a99883e5885..ccc12a3a95cb467496c7136b0ec8df6de273f362 100644
--- a/ash/wm/screen_pinning_controller_unittest.cc
+++ b/ash/wm/screen_pinning_controller_unittest.cc
@@ -13,7 +13,6 @@
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ash/wm/wm_event.h"
-#include "ash/wm_window.h"
#include "base/stl_util.h"
#include "ui/aura/window.h"
@@ -44,13 +43,13 @@ TEST_F(ScreenPinningControllerTest, OnlyOnePinnedWindow) {
wm::ActivateWindow(w1);
wm::PinWindow(w1, /* trusted */ false);
- EXPECT_TRUE(WmWindow::Get(w1)->GetWindowState()->IsPinned());
- EXPECT_FALSE(WmWindow::Get(w2)->GetWindowState()->IsPinned());
+ EXPECT_TRUE(wm::GetWindowState(w1)->IsPinned());
+ EXPECT_FALSE(wm::GetWindowState(w2)->IsPinned());
// Prohibit to pin two (or more) windows.
wm::PinWindow(w2, /* trusted */ false);
- EXPECT_TRUE(WmWindow::Get(w1)->GetWindowState()->IsPinned());
- EXPECT_FALSE(WmWindow::Get(w2)->GetWindowState()->IsPinned());
+ EXPECT_TRUE(wm::GetWindowState(w1)->IsPinned());
+ EXPECT_FALSE(wm::GetWindowState(w2)->IsPinned());
}
TEST_F(ScreenPinningControllerTest, FullscreenInPinnedMode) {
@@ -73,7 +72,7 @@ TEST_F(ScreenPinningControllerTest, FullscreenInPinnedMode) {
{
wm::ActivateWindow(w2);
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
- WmWindow::Get(w2)->GetWindowState()->OnWMEvent(&event);
+ wm::GetWindowState(w2)->OnWMEvent(&event);
}
{
// Verify that w1 is still in front of w2.
@@ -89,7 +88,7 @@ TEST_F(ScreenPinningControllerTest, FullscreenInPinnedMode) {
{
wm::ActivateWindow(w2);
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
- WmWindow::Get(w2)->GetWindowState()->OnWMEvent(&event);
+ wm::GetWindowState(w2)->OnWMEvent(&event);
}
{
// Verify that w1 is still in front of w2.
@@ -105,7 +104,7 @@ TEST_F(ScreenPinningControllerTest, FullscreenInPinnedMode) {
{
wm::ActivateWindow(w2);
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_MAXIMIZE);
- WmWindow::Get(w2)->GetWindowState()->OnWMEvent(&event);
+ wm::GetWindowState(w2)->OnWMEvent(&event);
}
{
// Verify that w1 is still in front of w2.
@@ -121,7 +120,7 @@ TEST_F(ScreenPinningControllerTest, FullscreenInPinnedMode) {
{
wm::ActivateWindow(w2);
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_MAXIMIZE);
- WmWindow::Get(w2)->GetWindowState()->OnWMEvent(&event);
+ wm::GetWindowState(w2)->OnWMEvent(&event);
}
{
// Verify that w1 is still in front of w2.
@@ -134,13 +133,13 @@ TEST_F(ScreenPinningControllerTest, FullscreenInPinnedMode) {
}
// Restore w1.
- WmWindow::Get(w1)->GetWindowState()->Restore();
+ wm::GetWindowState(w1)->Restore();
// Now, fullscreen-ize w2 should put it in front of w1.
{
wm::ActivateWindow(w2);
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
- WmWindow::Get(w2)->GetWindowState()->OnWMEvent(&event);
+ wm::GetWindowState(w2)->OnWMEvent(&event);
}
{
// Verify that w1 is still in front of w2.
« no previous file with comments | « ash/wm/screen_pinning_controller.cc ('k') | ash/wm/system_gesture_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698