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

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: I think the content_unittests timeout on linux_aura is flake, but try to fix it anyway. 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
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 f6f4271d24542bc40d34544fdc11c956ae2021bd..6e75658af32f1d997b23674a19e216dff5d99b59 100644
--- a/ash/wm/window_modality_controller_unittest.cc
+++ b/ash/wm/window_modality_controller_unittest.cc
@@ -42,11 +42,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());
@@ -87,13 +87,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());
@@ -140,14 +140,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);
@@ -178,10 +178,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());
@@ -210,11 +210,11 @@ TEST_F(WindowModalityControllerTest, Events) {
TEST_F(WindowModalityControllerTest, GetWindowModalTransient) {
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;
@@ -307,11 +307,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();

Powered by Google App Engine
This is Rietveld 408576698