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

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

Issue 92413002: Cursor state should be global for all CursorManagers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for review Created 7 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 | « no previous file | ash/test/cursor_manager_test_api.cc » ('j') | ui/aura/test/test_cursor_client.cc » ('J')
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/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 #if defined(OS_WIN) 119 #if defined(OS_WIN)
120 aura::test::SetUsePopupAsRootWindowForTest(true); 120 aura::test::SetUsePopupAsRootWindowForTest(true);
121 #endif 121 #endif
122 ash_test_helper_->SetUp(start_session_); 122 ash_test_helper_->SetUp(start_session_);
123 123
124 Shell::GetPrimaryRootWindow()->Show(); 124 Shell::GetPrimaryRootWindow()->Show();
125 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show(); 125 Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->Show();
126 // Move the mouse cursor to far away so that native events doesn't 126 // Move the mouse cursor to far away so that native events doesn't
127 // interfere test expectations. 127 // interfere test expectations.
128 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); 128 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000));
129 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); 129 ash::Shell::GetInstance()->cursor_manager()->ResetState();
130 130
131 #if defined(OS_WIN) 131 #if defined(OS_WIN)
132 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) { 132 if (!command_line->HasSwitch(ash::switches::kForceAshToDesktop)) {
133 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { 133 if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
134 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); 134 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread"));
135 base::Thread::Options options; 135 base::Thread::Options options;
136 options.message_loop_type = base::MessageLoop::TYPE_IO; 136 options.message_loop_type = base::MessageLoop::TYPE_IO;
137 ipc_thread_->StartWithOptions(options); 137 ipc_thread_->StartWithOptions(options);
138 metro_viewer_host_.reset( 138 metro_viewer_host_.reset(
139 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); 139 new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy()));
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 void AshTestBase::UnblockUserSession() { 336 void AshTestBase::UnblockUserSession() {
337 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 337 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
338 SetSessionStarted(true); 338 SetSessionStarted(true);
339 SetUserAddingScreenRunning(false); 339 SetUserAddingScreenRunning(false);
340 } 340 }
341 341
342 342
343 } // namespace test 343 } // namespace test
344 } // namespace ash 344 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/test/cursor_manager_test_api.cc » ('j') | ui/aura/test/test_cursor_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698