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

Unified Diff: ash/wm/window_modality_controller_unittest.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ash_unittests Created 8 years, 1 month 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/window_manager_unittest.cc ('k') | ash/wm/workspace/multi_window_resize_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_modality_controller_unittest.cc
diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc
index f24932461b1f7b82ed58ca139c85bf9651f86a2b..f8512342a617f9fe49995563645308d1ed7813f4 100644
--- a/ash/wm/window_modality_controller_unittest.cc
+++ b/ash/wm/window_modality_controller_unittest.cc
@@ -43,11 +43,11 @@ bool ValidateStacking(aura::Window* parent, int ids[], int count) {
TEST_F(WindowModalityControllerTest, BasicActivation) {
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
scoped_ptr<aura::Window> w11(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect()));
scoped_ptr<aura::Window> w12(
- aura::test::CreateTestWindowWithDelegate(&d, -12, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -12, gfx::Rect()));
w1->AddTransientChild(w11.get());
wm::ActivateWindow(w1.get());
@@ -88,13 +88,13 @@ TEST_F(WindowModalityControllerTest, BasicActivation) {
TEST_F(WindowModalityControllerTest, NestedModals) {
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
scoped_ptr<aura::Window> w11(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect()));
scoped_ptr<aura::Window> w111(
- aura::test::CreateTestWindowWithDelegate(&d, -111, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect()));
scoped_ptr<aura::Window> w2(
- aura::test::CreateTestWindowWithDelegate(&d, -2, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
w1->AddTransientChild(w11.get());
w11->AddTransientChild(w111.get());
@@ -141,14 +141,14 @@ TEST_F(WindowModalityControllerTest, NestedModals) {
TEST_F(WindowModalityControllerTest, NestedModalsOuterClosed) {
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
scoped_ptr<aura::Window> w11(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect()));
// |w111| will be owned and deleted by |w11|.
aura::Window* w111 =
- aura::test::CreateTestWindowWithDelegate(&d, -111, gfx::Rect(), NULL);
+ CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect());
scoped_ptr<aura::Window> w2(
- aura::test::CreateTestWindowWithDelegate(&d, -2, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
w1->AddTransientChild(w11.get());
w11->AddTransientChild(w111);
@@ -179,10 +179,10 @@ TEST_F(WindowModalityControllerTest, NestedModalsOuterClosed) {
// Modality also prevents events from being passed to the transient parent.
TEST_F(WindowModalityControllerTest, Events) {
aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(aura::test::CreateTestWindowWithDelegate(&d, -1,
- gfx::Rect(0, 0, 100, 100), NULL));
- scoped_ptr<aura::Window> w11(aura::test::CreateTestWindowWithDelegate(&d, -11,
- gfx::Rect(20, 20, 50, 50), NULL));
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d, -1,
+ gfx::Rect(0, 0, 100, 100)));
+ scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d, -11,
+ gfx::Rect(20, 20, 50, 50)));
w1->AddTransientChild(w11.get());
@@ -211,11 +211,11 @@ TEST_F(WindowModalityControllerTest, Events) {
TEST_F(WindowModalityControllerTest, GetModalTransient) {
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
scoped_ptr<aura::Window> w11(
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
scoped_ptr<aura::Window> w2(
- aura::test::CreateTestWindowWithDelegate(&d, -2, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
aura::Window* wt;
@@ -308,11 +308,11 @@ class TouchTrackerWindowDelegate : public aura::test::TestWindowDelegate {
// Modality should prevent events from being passed to the transient parent.
TEST_F(WindowModalityControllerTest, TouchEvent) {
TouchTrackerWindowDelegate d1;
- scoped_ptr<aura::Window> w1(aura::test::CreateTestWindowWithDelegate(&d1,
- -1, gfx::Rect(0, 0, 100, 100), NULL));
+ scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d1,
+ -1, gfx::Rect(0, 0, 100, 100)));
TouchTrackerWindowDelegate d11;
- scoped_ptr<aura::Window> w11(aura::test::CreateTestWindowWithDelegate(&d11,
- -11, gfx::Rect(20, 20, 50, 50), NULL));
+ scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d11,
+ -11, gfx::Rect(20, 20, 50, 50)));
w1->AddTransientChild(w11.get());
d1.reset();
@@ -496,13 +496,13 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
TEST_F(WindowModalityControllerTest, WindowModalAncestor) {
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
scoped_ptr<aura::Window> w2(
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
scoped_ptr<aura::Window> w3(
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w2.get()));
scoped_ptr<aura::Window> w4(
- aura::test::CreateTestWindowWithDelegate(&d, -2, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
w1->AddTransientChild(w4.get());
@@ -524,13 +524,13 @@ TEST_F(WindowModalityControllerTest, WindowModalAncestor) {
TEST_F(WindowModalityControllerTest, ChildModalAncestor) {
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect()));
scoped_ptr<aura::Window> w2(
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
scoped_ptr<aura::Window> w3(
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w2.get()));
scoped_ptr<aura::Window> w4(
- aura::test::CreateTestWindowWithDelegate(&d, -2, gfx::Rect(), NULL));
+ CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect()));
w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_CHILD);
ash::wm::SetModalParent(w4.get(), w2.get());
w1->AddTransientChild(w4.get());
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ash/wm/workspace/multi_window_resize_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698