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

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

Issue 15966003: Revert 201806 "Create MetroViewerProcessHost as a common base fo..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | « trunk/src/ash/test/ash_test_base.h ('k') | trunk/src/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 ipc_thread_.reset(new base::Thread("test_metro_viewer_ipc_thread")); 122 metro_viewer_host_.reset(new TestMetroViewerProcessHost("viewer"));
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()));
130 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( 123 CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection(
131 win8::test::kDefaultTestAppUserModelId)); 124 win8::test::kDefaultTestAppUserModelId));
132 aura::RemoteRootWindowHostWin* root_window_host = 125 aura::RemoteRootWindowHostWin* root_window_host =
133 aura::RemoteRootWindowHostWin::Instance(); 126 aura::RemoteRootWindowHostWin::Instance();
134 CHECK(root_window_host != NULL); 127 CHECK(root_window_host != NULL);
135 } 128 }
136 #endif 129 #endif
137 } 130 }
138 131
139 void AshTestBase::TearDown() { 132 void AshTestBase::TearDown() {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 SetHasActiveUser(user_logged_in); 256 SetHasActiveUser(user_logged_in);
264 } 257 }
265 258
266 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { 259 void AshTestBase::SetCanLockScreen(bool can_lock_screen) {
267 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> 260 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
268 SetCanLockScreen(can_lock_screen); 261 SetCanLockScreen(can_lock_screen);
269 } 262 }
270 263
271 } // namespace test 264 } // namespace test
272 } // namespace ash 265 } // namespace ash
OLDNEW
« no previous file with comments | « trunk/src/ash/test/ash_test_base.h ('k') | trunk/src/ash/test/test_metro_viewer_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698