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

Unified Diff: ui/aura_shell/modal_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/modal_container_layout_manager.cc ('k') | ui/aura_shell/root_window_event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/modal_container_layout_manager_unittest.cc
===================================================================
--- ui/aura_shell/modal_container_layout_manager_unittest.cc (revision 113260)
+++ ui/aura_shell/modal_container_layout_manager_unittest.cc (working copy)
@@ -5,7 +5,7 @@
#include "ui/aura_shell/modal_container_layout_manager.h"
#include "base/compiler_specific.h"
-#include "ui/aura/desktop.h"
+#include "ui/aura/root_window.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura_shell/shell.h"
@@ -100,7 +100,7 @@
TEST_F(ModalContainerLayoutManagerTest, ModalTransient) {
scoped_ptr<aura::Window> parent(TestWindow::OpenTestWindow(NULL, false));
// parent should be active.
- EXPECT_EQ(parent.get(), aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(parent.get(), aura::RootWindow::GetInstance()->active_window());
aura::Window* t1 = TestWindow::OpenTestWindow(parent.get(), true);
TransientWindowObserver do1;
@@ -110,19 +110,19 @@
EXPECT_EQ(GetModalContainer(), t1->parent());
// t1 should now be active.
- EXPECT_EQ(t1, aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(t1, aura::RootWindow::GetInstance()->active_window());
// Attempting to click the parent should result in no activation change.
aura::test::EventGenerator e1(parent.get());
e1.ClickLeftButton();
- EXPECT_EQ(t1, aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(t1, aura::RootWindow::GetInstance()->active_window());
// Now open another modal transient parented to the original modal transient.
aura::Window* t2 = TestWindow::OpenTestWindow(t1, true);
TransientWindowObserver do2;
t2->AddObserver(&do2);
- EXPECT_EQ(t2, aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(t2, aura::RootWindow::GetInstance()->active_window());
EXPECT_EQ(t1, t2->transient_parent());
EXPECT_EQ(GetModalContainer(), t2->parent());
@@ -130,7 +130,7 @@
// t2 should still be active, even after clicking on t1.
aura::test::EventGenerator e2(t1);
e2.ClickLeftButton();
- EXPECT_EQ(t2, aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(t2, aura::RootWindow::GetInstance()->active_window());
// Both transients should be destroyed with parent.
parent.reset();
@@ -145,28 +145,28 @@
unrelated->SetBounds(gfx::Rect(100, 100, 50, 50));
scoped_ptr<aura::Window> parent(TestWindow::OpenTestWindow(NULL, false));
// parent should be active.
- EXPECT_EQ(parent.get(), aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(parent.get(), aura::RootWindow::GetInstance()->active_window());
scoped_ptr<aura::Window> transient(
TestWindow::OpenTestWindow(parent.get(), true));
// t1 should now be active.
- EXPECT_EQ(transient.get(), aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(transient.get(), aura::RootWindow::GetInstance()->active_window());
// Attempting to click the parent should result in no activation change.
aura::test::EventGenerator e1(parent.get());
e1.ClickLeftButton();
- EXPECT_EQ(transient.get(), aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(transient.get(), aura::RootWindow::GetInstance()->active_window());
// Now close the transient.
transient.reset();
// parent should now be active again.
- EXPECT_EQ(parent.get(), aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(parent.get(), aura::RootWindow::GetInstance()->active_window());
// Attempting to click unrelated should activate it.
aura::test::EventGenerator e2(unrelated.get());
e2.ClickLeftButton();
- EXPECT_EQ(unrelated.get(), aura::Desktop::GetInstance()->active_window());
+ EXPECT_EQ(unrelated.get(), aura::RootWindow::GetInstance()->active_window());
}
} // namespace test
« no previous file with comments | « ui/aura_shell/modal_container_layout_manager.cc ('k') | ui/aura_shell/root_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698