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

Side by Side Diff: athena/wm/window_manager_unittest.cc

Issue 662763002: Support modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: fix leaks 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 unified diff | Download patch
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | chrome/browser/chromeos/login/ui/lock_window_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/wm/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include "athena/screen/public/screen_manager.h" 7 #include "athena/screen/public/screen_manager.h"
8 #include "athena/test/base/athena_test_base.h" 8 #include "athena/test/base/athena_test_base.h"
9 #include "athena/test/base/test_windows.h"
9 #include "athena/wm/public/window_list_provider.h" 10 #include "athena/wm/public/window_list_provider.h"
10 #include "athena/wm/split_view_controller.h" 11 #include "athena/wm/split_view_controller.h"
11 #include "athena/wm/test/window_manager_impl_test_api.h" 12 #include "athena/wm/test/window_manager_impl_test_api.h"
12 #include "athena/wm/window_manager_impl.h" 13 #include "athena/wm/window_manager_impl.h"
13 #include "ui/aura/client/window_tree_client.h" 14 #include "ui/aura/client/window_tree_client.h"
14 #include "ui/aura/test/test_window_delegate.h" 15 #include "ui/aura/test/test_window_delegate.h"
15 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
16 #include "ui/base/hit_test.h" 17 #include "ui/base/hit_test.h"
17 #include "ui/events/test/event_generator.h" 18 #include "ui/events/test/event_generator.h"
18 #include "ui/gfx/display.h" 19 #include "ui/gfx/display.h"
19 #include "ui/gfx/screen.h" 20 #include "ui/gfx/screen.h"
20 #include "ui/wm/core/window_util.h" 21 #include "ui/wm/core/window_util.h"
21 22
22 namespace athena { 23 namespace athena {
23 24
24 class WindowManagerTest : public test::AthenaTestBase { 25 class WindowManagerTest : public test::AthenaTestBase {
25 public: 26 public:
26 WindowManagerTest() {} 27 WindowManagerTest() {}
27 virtual ~WindowManagerTest() {} 28 virtual ~WindowManagerTest() {}
28 29
29 scoped_ptr<aura::Window> CreateAndActivateWindow( 30 scoped_ptr<aura::Window> CreateAndActivateWindow(
30 aura::WindowDelegate* delegate) { 31 aura::WindowDelegate* delegate) {
31 scoped_ptr<aura::Window> window(CreateTestWindow(delegate, gfx::Rect())); 32 scoped_ptr<aura::Window> window(test::CreateNormalWindow(delegate, NULL));
32 window->Show(); 33 window->Show();
33 wm::ActivateWindow(window.get()); 34 wm::ActivateWindow(window.get());
34 return window.Pass(); 35 return window.Pass();
35 } 36 }
36 37
37 private: 38 private:
38 DISALLOW_COPY_AND_ASSIGN(WindowManagerTest); 39 DISALLOW_COPY_AND_ASSIGN(WindowManagerTest);
39 }; 40 };
40 41
41 TEST_F(WindowManagerTest, OverviewModeBasics) { 42 TEST_F(WindowManagerTest, OverviewModeBasics) {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 aura::test::TestWindowDelegate delegate; 386 aura::test::TestWindowDelegate delegate;
386 scoped_ptr<aura::Window> w1(CreateAndActivateWindow(&delegate)); 387 scoped_ptr<aura::Window> w1(CreateAndActivateWindow(&delegate));
387 WindowManager::Get()->EnterOverview(); 388 WindowManager::Get()->EnterOverview();
388 389
389 ui::test::EventGenerator generator(root_window()); 390 ui::test::EventGenerator generator(root_window());
390 generator.MoveMouseTo(1, 1); 391 generator.MoveMouseTo(1, 1);
391 generator.ClickLeftButton(); 392 generator.ClickLeftButton();
392 } 393 }
393 394
394 } // namespace athena 395 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | chrome/browser/chromeos/login/ui/lock_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698