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

Unified Diff: ui/aura_shell/default_container_layout_manager_unittest.cc

Issue 8771015: Rename Desktop->RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « ui/aura_shell/default_container_layout_manager.cc ('k') | ui/aura_shell/desktop_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/default_container_layout_manager_unittest.cc
===================================================================
--- ui/aura_shell/default_container_layout_manager_unittest.cc (revision 113260)
+++ ui/aura_shell/default_container_layout_manager_unittest.cc (working copy)
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_vector.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/desktop.h"
+#include "ui/aura/root_window.h"
#include "ui/aura/screen_aura.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/window.h"
@@ -33,16 +33,16 @@
virtual void SetUp() OVERRIDE {
aura::test::AuraTestBase::SetUp();
- aura::Desktop* desktop = aura::Desktop::GetInstance();
+ aura::RootWindow* root_window = aura::RootWindow::GetInstance();
container_.reset(
- CreateTestWindow(gfx::Rect(0, 0, 500, 400), desktop));
+ CreateTestWindow(gfx::Rect(0, 0, 500, 400), root_window));
workspace_controller_.reset(
new aura_shell::internal::WorkspaceController(container_.get()));
layout_manager_ = new DefaultContainerLayoutManager(
workspace_controller_->workspace_manager());
container_->SetLayoutManager(layout_manager_);
- desktop->SetHostSize(gfx::Size(500, 400));
+ root_window->SetHostSize(gfx::Size(500, 400));
}
aura::Window* CreateTestWindowWithType(const gfx::Rect& bounds,
@@ -166,7 +166,7 @@
scoped_ptr<aura::Window> window(new aura::Window(NULL));
window->SetType(aura::WINDOW_TYPE_NORMAL);
window->Init(ui::Layer::LAYER_HAS_NO_TEXTURE);
- aura::Desktop::GetInstance()->AddTransientChild(window.get());
+ aura::RootWindow::GetInstance()->AddTransientChild(window.get());
window->SetBounds(gfx::Rect(0, 0, 200, 200));
window->Show();
window->SetParent(container());
@@ -265,8 +265,8 @@
EXPECT_EQ(50, w->bounds().height());
}
-// Tests that fullscreen windows get resized after desktop is resized.
-TEST_F(DefaultContainerLayoutManagerTest, FullscreenAfterDesktopResize) {
+// Tests that fullscreen windows get resized after root window is resized.
+TEST_F(DefaultContainerLayoutManagerTest, FullscreenAfterRootWindowResize) {
scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(300, 400),
container()));
gfx::Rect window_bounds = w1->GetTargetBounds();
@@ -279,11 +279,11 @@
Fullscreen(w1.get());
EXPECT_EQ(fullscreen_bounds.ToString(), w1->bounds().ToString());
- // Resize the desktop.
- aura::Desktop* desktop = aura::Desktop::GetInstance();
- gfx::Size new_desktop_size = desktop->GetHostSize();
- new_desktop_size.Enlarge(100, 200);
- desktop->OnHostResized(new_desktop_size);
+ // Resize the root window.
+ aura::RootWindow* root_window = aura::RootWindow::GetInstance();
+ gfx::Size new_root_window_size = root_window->GetHostSize();
+ new_root_window_size.Enlarge(100, 200);
+ root_window->OnHostResized(new_root_window_size);
gfx::Rect new_fullscreen_bounds =
workspace_manager()->FindBy(w1.get())->bounds();
@@ -301,8 +301,8 @@
// w1->GetTargetBounds().size().ToString());
}
-// Tests that maximized windows get resized after desktop is resized.
-TEST_F(DefaultContainerLayoutManagerTest, MaximizeAfterDesktopResize) {
+// Tests that maximized windows get resized after root_window is resized.
+TEST_F(DefaultContainerLayoutManagerTest, MaximizeAfterRootWindowResize) {
scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(300, 400),
container()));
gfx::Rect window_bounds = w1->GetTargetBounds();
@@ -315,11 +315,11 @@
Maximize(w1.get());
EXPECT_EQ(work_area_bounds.ToString(), w1->bounds().ToString());
- // Resize the desktop.
- aura::Desktop* desktop = aura::Desktop::GetInstance();
- gfx::Size new_desktop_size = desktop->GetHostSize();
- new_desktop_size.Enlarge(100, 200);
- desktop->OnHostResized(new_desktop_size);
+ // Resize the root window.
+ aura::RootWindow* root_window = aura::RootWindow::GetInstance();
+ gfx::Size new_root_window_size = root_window->GetHostSize();
+ new_root_window_size.Enlarge(100, 200);
+ root_window->OnHostResized(new_root_window_size);
gfx::Rect new_work_area_bounds =
workspace_manager()->FindBy(w1.get())->bounds();
« no previous file with comments | « ui/aura_shell/default_container_layout_manager.cc ('k') | ui/aura_shell/desktop_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698