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

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

Issue 14629025: Create MetroViewerProcessHost as a common base for TestMetroViewerProcessHost and ChromeMetroViewer… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge before dcommit Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/test_metro_viewer_process_host.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/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 Shell::GetPrimaryRootWindow()->ShowRootWindow(); 112 Shell::GetPrimaryRootWindow()->ShowRootWindow();
113 // Move the mouse cursor to far away so that native events doesn't 113 // Move the mouse cursor to far away so that native events doesn't
114 // interfere test expectations. 114 // interfere test expectations.
115 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); 115 Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000));
116 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); 116 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
117 117
118 #if defined(OS_WIN) 118 #if defined(OS_WIN)
119 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 119 if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
120 !CommandLine::ForCurrentProcess()->HasSwitch( 120 !CommandLine::ForCurrentProcess()->HasSwitch(
121 ash::switches::kForceAshToDesktop)) { 121 ash::switches::kForceAshToDesktop)) {
122 metro_viewer_host_.reset(new TestMetroViewerProcessHost("viewer")); 122 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread"));
123 base::Thread::Options options;
124 options.message_loop_type = base::MessageLoop::TYPE_IO;
125 ipc_thread_->StartWithOptions(options);
126
127 metro_viewer_host_.reset(
128 new TestMetroViewerProcessHost("viewer",
129 ipc_thread_->message_loop_proxy()));
123 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( 130 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection(
124 win8::test::kDefaultTestAppUserModelId)); 131 win8::test::kDefaultTestAppUserModelId));
125 aura::RemoteRootWindowHostWin* root_window_host = 132 aura::RemoteRootWindowHostWin* root_window_host =
126 aura::RemoteRootWindowHostWin::Instance(); 133 aura::RemoteRootWindowHostWin::Instance();
127 CHECK(root_window_host != NULL); 134 CHECK(root_window_host != NULL);
128 } 135 }
129 #endif 136 #endif
130 } 137 }
131 138
132 void AshTestBase::TearDown() { 139 void AshTestBase::TearDown() {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 SetHasActiveUser(user_logged_in); 263 SetHasActiveUser(user_logged_in);
257 } 264 }
258 265
259 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { 266 void AshTestBase::SetCanLockScreen(bool can_lock_screen) {
260 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> 267 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
261 SetCanLockScreen(can_lock_screen); 268 SetCanLockScreen(can_lock_screen);
262 } 269 }
263 270
264 } // namespace test 271 } // namespace test
265 } // namespace ash 272 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/test_metro_viewer_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698