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

Unified Diff: athena/wm/window_list_provider_impl_unittest.cc

Issue 665803003: Revert of Support modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « athena/wm/split_view_controller_unittest.cc ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_list_provider_impl_unittest.cc
diff --git a/athena/wm/window_list_provider_impl_unittest.cc b/athena/wm/window_list_provider_impl_unittest.cc
index d3dd2859b26752d283f544a6bc9bc259f9d4e869..5b03d2d4b230255d292f9e12ad730f881495b68a 100644
--- a/athena/wm/window_list_provider_impl_unittest.cc
+++ b/athena/wm/window_list_provider_impl_unittest.cc
@@ -8,7 +8,6 @@
#include "athena/screen/public/screen_manager.h"
#include "athena/test/base/athena_test_base.h"
-#include "athena/test/base/test_windows.h"
#include "athena/wm/public/window_list_provider_observer.h"
#include "athena/wm/public/window_manager.h"
#include "ui/aura/client/window_tree_client.h"
@@ -34,6 +33,18 @@
window->Init(aura::WINDOW_LAYER_SOLID_COLOR);
if (parent)
parent->AddChild(window.get());
+ return window.Pass();
+}
+
+scoped_ptr<aura::Window> CreateTransientWindow(aura::Window* transient_parent,
+ aura::WindowDelegate* delegate,
+ ui::wm::WindowType window_type) {
+ scoped_ptr<aura::Window> window(new aura::Window(delegate));
+ window->SetType(window_type);
+ window->Init(aura::WINDOW_LAYER_SOLID_COLOR);
+ wm::AddTransientChild(transient_parent, window.get());
+ aura::client::ParentWindowWithContext(
+ window.get(), ScreenManager::Get()->GetContext(), gfx::Rect());
return window.Pass();
}
@@ -105,8 +116,8 @@
scoped_ptr<WindowListProvider> list_provider(
new WindowListProviderImpl(container.get()));
- scoped_ptr<aura::Window> first = test::CreateWindowWithType(
- &delegate, container.get(), ui::wm::WINDOW_TYPE_NORMAL);
+ scoped_ptr<aura::Window> first =
+ CreateWindow(container.get(), &delegate, ui::wm::WINDOW_TYPE_NORMAL);
scoped_ptr<aura::Window> second =
CreateWindow(container.get(), &delegate, ui::wm::WINDOW_TYPE_NORMAL);
scoped_ptr<aura::Window> third =
@@ -296,12 +307,12 @@
scoped_ptr<WindowListObserver> observer(
new WindowListObserver(list_provider));
- scoped_ptr<aura::Window> w1 = test::CreateNormalWindow(&delegate, NULL);
+ scoped_ptr<aura::Window> w1 = CreateTestWindow(&delegate, gfx::Rect());
w1->Show();
- scoped_ptr<aura::Window> w2 = test::CreateNormalWindow(&delegate, NULL);
+ scoped_ptr<aura::Window> w2 = CreateTestWindow(&delegate, gfx::Rect());
w2->Show();
- scoped_ptr<aura::Window> t1 = test::CreateTransientWindow(
- &delegate, w1.get(), ui::MODAL_TYPE_NONE, false);
+ scoped_ptr<aura::Window> t1 =
+ CreateTransientWindow(w1.get(), &delegate, ui::wm::WINDOW_TYPE_NORMAL);
t1->Show();
EXPECT_EQ(2u, list_provider->GetWindowList().size());
« no previous file with comments | « athena/wm/split_view_controller_unittest.cc ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698