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

Unified Diff: ash/wallpaper/wallpaper_controller_unittest.cc

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback 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 | « ash/system/tray/tray_event_filter.cc ('k') | ash/wm/always_on_top_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wallpaper/wallpaper_controller_unittest.cc
diff --git a/ash/wallpaper/wallpaper_controller_unittest.cc b/ash/wallpaper/wallpaper_controller_unittest.cc
index 90e7a6dac2fb681843035afc83b6c7c0f43f5da7..29591f6d719851456d6b5b00ad8d7d328caac251 100644
--- a/ash/wallpaper/wallpaper_controller_unittest.cc
+++ b/ash/wallpaper/wallpaper_controller_unittest.cc
@@ -13,7 +13,6 @@
#include "ash/root_window_controller.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
-#include "ash/shell_port.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/test_session_controller_client.h"
#include "ash/test/test_wallpaper_delegate.h"
@@ -27,6 +26,7 @@
#include "base/threading/sequenced_worker_pool.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/aura/window.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/test/layer_animator_test_controller.h"
#include "ui/gfx/canvas.h"
@@ -49,9 +49,9 @@ const int kLockScreenWallpaperId =
// Returns number of child windows in a shell window container.
int ChildCountForContainer(int container_id) {
- WmWindow* root = ShellPort::Get()->GetPrimaryRootWindow();
- WmWindow* container = root->GetChildByShellWindowId(container_id);
- return static_cast<int>(container->GetChildren().size());
+ aura::Window* root = Shell::Get()->GetPrimaryRootWindow();
+ aura::Window* container = root->GetChildById(container_id);
+ return static_cast<int>(container->children().size());
}
// Steps a widget's layer animation until it is completed. Animations must be
@@ -120,7 +120,7 @@ class WallpaperControllerTest : public test::AshTestBase {
// Ash shell initialization creates wallpaper. Reset it so we can manually
// control wallpaper creation and animation in our tests.
RootWindowController* root_window_controller =
- ShellPort::Get()->GetPrimaryRootWindow()->GetRootWindowController();
+ Shell::Get()->GetPrimaryRootWindowController();
root_window_controller->SetWallpaperWidgetController(nullptr);
root_window_controller->SetAnimatingWallpaperWidgetController(nullptr);
controller_ = Shell::Get()->wallpaper_controller();
@@ -131,9 +131,8 @@ class WallpaperControllerTest : public test::AshTestBase {
WallpaperView* wallpaper_view() {
WallpaperWidgetController* controller =
- ShellPort::Get()
- ->GetPrimaryRootWindow()
- ->GetRootWindowController()
+ Shell::Get()
+ ->GetPrimaryRootWindowController()
->animating_wallpaper_widget_controller()
->GetController(false);
EXPECT_TRUE(controller);
@@ -187,9 +186,8 @@ class WallpaperControllerTest : public test::AshTestBase {
// TODO(bshe): Don't require tests to run animations; it's slow.
void RunDesktopControllerAnimation() {
WallpaperWidgetController* controller =
- ShellPort::Get()
- ->GetPrimaryRootWindow()
- ->GetRootWindowController()
+ Shell::Get()
+ ->GetPrimaryRootWindowController()
->animating_wallpaper_widget_controller()
->GetController(false);
EXPECT_TRUE(controller);
@@ -266,7 +264,7 @@ TEST_F(WallpaperControllerTest, ControllerOwnership) {
// The new wallpaper is ready to animate.
RootWindowController* root_window_controller =
- ShellPort::Get()->GetPrimaryRootWindow()->GetRootWindowController();
+ Shell::Get()->GetPrimaryRootWindowController();
EXPECT_TRUE(root_window_controller->animating_wallpaper_widget_controller()
->GetController(false));
EXPECT_FALSE(root_window_controller->wallpaper_widget_controller());
@@ -302,7 +300,7 @@ TEST_F(WallpaperControllerTest, WallpaperMovementDuringUnlock) {
// In this state we have two wallpaper views stored in different properties.
// Both are in the lock screen wallpaper container.
RootWindowController* root_window_controller =
- ShellPort::Get()->GetPrimaryRootWindow()->GetRootWindowController();
+ Shell::Get()->GetPrimaryRootWindowController();
EXPECT_TRUE(root_window_controller->animating_wallpaper_widget_controller()
->GetController(false));
EXPECT_TRUE(root_window_controller->wallpaper_widget_controller());
@@ -343,7 +341,7 @@ TEST_F(WallpaperControllerTest, ChangeWallpaperQuick) {
controller->CreateEmptyWallpaper();
RootWindowController* root_window_controller =
- ShellPort::Get()->GetPrimaryRootWindow()->GetRootWindowController();
+ Shell::Get()->GetPrimaryRootWindowController();
WallpaperWidgetController* animating_controller =
root_window_controller->animating_wallpaper_widget_controller()
->GetController(false);
« no previous file with comments | « ash/system/tray/tray_event_filter.cc ('k') | ash/wm/always_on_top_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698