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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shell.cc ('k') | ash/test/cursor_manager_test_api.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ui::LayerAnimator::set_disable_animations_for_test(true); 58 ui::LayerAnimator::set_disable_animations_for_test(true);
59 ui::TextInputTestSupport::Initialize(); 59 ui::TextInputTestSupport::Initialize();
60 // Creates Shell and hook with Desktop. 60 // Creates Shell and hook with Desktop.
61 test_shell_delegate_ = new TestShellDelegate; 61 test_shell_delegate_ = new TestShellDelegate;
62 ash::Shell::CreateInstance(test_shell_delegate_); 62 ash::Shell::CreateInstance(test_shell_delegate_);
63 Shell::GetPrimaryRootWindow()->Show(); 63 Shell::GetPrimaryRootWindow()->Show();
64 Shell::GetPrimaryRootWindow()->ShowRootWindow(); 64 Shell::GetPrimaryRootWindow()->ShowRootWindow();
65 // Move the mouse cursor to far away so that native events doesn't 65 // Move the mouse cursor to far away so that native events doesn't
66 // interfere test expectations. 66 // interfere test expectations.
67 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); 67 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000));
68 Shell::GetInstance()->cursor_manager()->ShowCursor(true); 68 Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
69 } 69 }
70 70
71 void AshTestBase::TearDown() { 71 void AshTestBase::TearDown() {
72 // Flush the message loop to finish pending release tasks. 72 // Flush the message loop to finish pending release tasks.
73 RunAllPendingInMessageLoop(); 73 RunAllPendingInMessageLoop();
74 74
75 // Tear down the shell. 75 // Tear down the shell.
76 Shell::DeleteInstance(); 76 Shell::DeleteInstance();
77 aura::Env::DeleteInstance(); 77 aura::Env::DeleteInstance();
78 ui::TextInputTestSupport::Shutdown(); 78 ui::TextInputTestSupport::Shutdown();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { 160 void AshTestBase::SetUserLoggedIn(bool user_logged_in) {
161 test_shell_delegate_->SetUserLoggedIn(user_logged_in); 161 test_shell_delegate_->SetUserLoggedIn(user_logged_in);
162 } 162 }
163 163
164 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { 164 void AshTestBase::SetCanLockScreen(bool can_lock_screen) {
165 test_shell_delegate_->SetCanLockScreen(can_lock_screen); 165 test_shell_delegate_->SetCanLockScreen(can_lock_screen);
166 } 166 }
167 167
168 } // namespace test 168 } // namespace test
169 } // namespace ash 169 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/test/cursor_manager_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698